git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jonathan NiederNext: Jonathan Nieder
Message 4 of 9 in “post-receive-email: declaring and consistently using one output encoding”
  1. 0/2 post-receive-email: declaring and consistently using one output encodingJonathan Nieder, Mar 8, 2012
  2. 1/2 hooks/post-receive-email: set encoding to utf-8Jonathan Nieder, Mar 8, 2012
  3. 2/2 post-receive-email: defend against non UTF-8 i18n.logoutputencoding settingJonathan Nieder, Mar 8, 2012
  4. Jeff KingMar 8, 2012
  5. Jonathan NiederMar 8, 2012
  6. Alexey ShumkinMar 14, 2012
  7. Jonathan NiederMar 14, 2012
  8. Junio C HamanoMar 8, 2012
  9. Jon JensenMar 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.