diff options
| author | Junio C Hamano <gitster@pobox.com> | 2014-06-25 11:45:31 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-06-25 11:45:32 -0700 |
| commit | ad5d8939078a50c247e259cdc1b6d615b233bf47 (patch) | |
| tree | 3c44315949a7ff1cfd601a0679378bfb3676e47b /t/t4041-diff-submodule-option.sh | |
| parent | 91043fc95c20e03b1827b86498b7966349dd9ffe (diff) | |
| parent | 7d509878b845a2a895cc880b833a016a06199981 (diff) | |
Merge branch 'as/pretty-truncate' into maint
The "%<(10,trunc)%s" pretty format specifier in the log family of
commands is used to truncate the string to a given length (e.g. 10
in the example) with padding to column-align the output, but did
not take into account that number of bytes and number of display
columns are different.
* as/pretty-truncate:
pretty.c: format string with truncate respects logOutputEncoding
t4205, t6006: add tests that fail with i18n.logOutputEncoding set
t4205 (log-pretty-format): use `tformat` rather than `format`
t4041, t4205, t6006, t7102: don't hardcode tested encoding value
t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs
Diffstat (limited to 't/t4041-diff-submodule-option.sh')
| -rwxr-xr-x | t/t4041-diff-submodule-option.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh index 1751c83307..463d63bde0 100755 --- a/t/t4041-diff-submodule-option.sh +++ b/t/t4041-diff-submodule-option.sh @@ -11,6 +11,9 @@ This test tries to verify the sanity of the --submodule option of git diff. . ./test-lib.sh +# Tested non-UTF-8 encoding +test_encoding="ISO8859-1" + # String "added" in German (translated with Google Translate), encoded in UTF-8, # used in sample commit log messages in add_file() function below. added=$(printf "hinzugef\303\274gt") @@ -23,8 +26,8 @@ add_file () { echo "$name" >"$name" && git add "$name" && test_tick && - msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1) && - git -c 'i18n.commitEncoding=iso8859-1' commit -m "$msg_added_iso88591" + msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t $test_encoding) && + git -c "i18n.commitEncoding=$test_encoding" commit -m "$msg_added_iso88591" done >/dev/null && git rev-parse --short --verify HEAD ) |
