pretty: Add failing tests: --format output should honor logOutputEncoding
commitde6029a2d7734a93a9e27b9c4471862a47dd8123
authorAlexey Shumkin <Alex.Crezoff@gmail.com>
Wed, 26 Jun 2013 10:19:49 +0000 (26 14:19 +0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Jun 2013 18:40:27 +0000 (26 11:40 -0700)
tree2932d4fa44ffdf809c9f85ea109bffdda7183ec1
parenta742f2a0a7e57bb7d3f55cb8312c3f4cc4dc68fb
pretty: Add failing tests: --format output should honor logOutputEncoding

One can set an alias
$ git config 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 adds failing tests for the next patch that fixes them.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4041-diff-submodule-option.sh
t/t4205-log-pretty-formats.sh
t/t6006-rev-list-format.sh
t/t7102-reset.sh