Files
git/builtin
Alexey Shumkin ecaee8050c pretty: --format output should honor logOutputEncoding
One can set an alias
	$ git config [--global] alias.lg "log --graph --pretty=format:'%Cred%h%Creset
	-%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset'
	--abbrev-commit --date=local"

to see the log as a pretty tree (like *gitk* but in a terminal).

However, log messages written in an encoding i18n.commitEncoding which differs
from terminal encoding are shown corrupted even when i18n.logOutputEncoding
and terminal encoding are the same (e.g. log messages committed on a Cygwin box
with Windows-1251 encoding seen on a Linux box with a UTF-8 encoding and vice versa).

To simplify an example we can say the following two commands are expected
to give the same output to a terminal:

	$ git log --oneline --no-color
	$ git log --pretty=format:'%h %s'

However, the former pays attention to i18n.logOutputEncoding
configuration, while the latter does not when it formats "%s".

The same corruption is true for
	$ git diff --submodule=log
and
	$ git rev-list --pretty=format:%s HEAD
and
	$ git reset --hard

This patch makes pretty --format honor logOutputEncoding when it formats
log message.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-26 11:40:31 -07:00
..
2013-04-26 15:28:09 -07:00
2013-04-23 11:22:48 -07:00
2013-04-15 11:04:44 -07:00
2012-09-17 15:59:34 -07:00
2013-01-23 21:19:10 -08:00
2012-11-20 10:32:10 -08:00
2013-02-01 12:40:16 -08:00
2012-09-27 17:57:26 -07:00
2013-04-03 09:18:01 -07:00
2013-04-26 15:28:39 -07:00
2012-09-11 11:36:05 -07:00
2013-01-16 12:48:22 -08:00
2012-10-25 06:42:27 -04:00
2012-10-25 06:42:27 -04:00
2013-01-16 12:48:22 -08:00