Re: [PATCH 2/2] post-receive-email: defend against non UTF-8 i18n.logoutputencoding setting
- From
Jeff King <peff@peff.net>
- Date
- Mar 8, 2012, 13:50 UTC
- Message-ID
- <20120308135030.GB30602@sigill.intra.peff.net>
- In-Reply-To
- <20120308115957.GB2750@burratino>
On Thu, Mar 08, 2012 at 05:59:57AM -0600, Jonathan Nieder wrote:
Show 11 quoted lines
> diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email > index dc184d0b..b59e03cd 100755 > --- a/contrib/hooks/post-receive-email > +++ b/contrib/hooks/post-receive-email > @@ -464,7 +464,7 @@ generate_delete_branch_email() > echo " was $oldrev" > echo "" > echo $LOGBEGIN > - git show -s --pretty=oneline $oldrev > + git diff-tree --encoding=UTF-8 -s --pretty=oneline $oldrev > echo $LOGEND
If you are using "-s" to suppress diff output, why are you using diff-tree? Wouldn't "rev-list -1" (or "rev-list --no-walk") work equally well and be a little more obvious?
-Peff