Thread (5 messages) 5 messages, 2 authors, 2016-06-15

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

From: Uwe Kleine-König <hidden>
Date: 2016-06-15 22:47:45

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 [off-list ref]
	Uwe Kleine-König
	Author: Uwe Kleine-König [off-list ref]

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/  |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help