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

more problems with commit encoding [Was: [PATCH] shortlog: respect commit encoding]

From
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date
Nov 24, 2009, 16:08 UTC
Message-ID
<20091124160837.GA7296@pengutronix.de>
In-Reply-To
<1259075555-7831-1-git-send-email-u.kleine-koenig@pengutronix.de>
Hello,
On Tue, Nov 24, 2009 at 04:12:35PM +0100, Uwe Kleine-König wrote:
> Before this change the author was taken from the raw commit without
> reencoding.
while at it, userformats have the same problem:
	linux-2.6$ for rev in b71a8eb bc9be01; do git show --format=%an $rev | head -n1; git show $rev | grep Auth; done
	Uwe Kleine-K�nig
	Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
	Uwe Kleine-König
	Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

That is, git show correctly reencodes its output for b71a8eb, but only without --format=...

(The patches above are in linux-next.)
And now take this (assuming locale and commitencoding are utf-8):
	git init
	git config user.name 'Jöhännës Dschö'
	echo spam > ham
	git add ham
	git commit -m 'initial commit'
	git branch branch
	echo more spam > ham
	git add ham
	git commit -m "Commitlog matching '\nencoding:'
encoding: latin1
"
	git checkout branch
	echo much more spam > ham
	git add ham
	git commit -C master
	git show | grep Author:

Best regards Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Previous: Uwe Kleine-KönigNext: Junio C Hamano
Message 3 of 5 in “Re: commit log encoding [Was: [PATCH 1/2] tree-wide: fix typos "offest" -> "offset"]”
  1. Uwe Kleine-KönigNov 11, 2009
  2. shortlog: respect commit encodingUwe Kleine-König, Nov 24, 2009
  3. more problems with commit encoding [Was: [PATCH] shortlog: respect commit encoding]Uwe Kleine-König, Nov 24, 2009
  4. Junio C HamanoNov 25, 2009
  5. Uwe Kleine-KönigNov 25, 2009

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.