diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-02-27 15:11:52 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-27 15:11:53 -0800 |
| commit | ac78c5804e080aa8f0307155eda85465a2a1b1dd (patch) | |
| tree | fda4edf63d36f5fb9bfe57526577be8141c7a182 /t/t4060-diff-submodule-option-diff-format.sh | |
| parent | a62d0da86a763ab03604d75eb287776a7d639e1f (diff) | |
| parent | eb49c6ef43e3f7ac0050bddf42ea85641965dc90 (diff) | |
| download | git-ac78c5804e080aa8f0307155eda85465a2a1b1dd.tar.xz | |
Merge branch 'ps/tests-wo-iconv-fixes'
Some tests assumed "iconv" is available without honoring ICONV
prerequisite, which has been corrected.
* ps/tests-wo-iconv-fixes:
t6006: don't use iconv(1) without ICONV prereq
t5550: add ICONV prereq to tests that use "$HTTPD_URL/error"
t4205: improve handling of ICONV prerequisite
t40xx: don't use iconv(1) without ICONV prereq
t: don't set ICONV prereq when iconv(1) is missing
Diffstat (limited to 't/t4060-diff-submodule-option-diff-format.sh')
| -rwxr-xr-x | t/t4060-diff-submodule-option-diff-format.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh index dbfeb7470b..d8f9213255 100755 --- a/t/t4060-diff-submodule-option-diff-format.sh +++ b/t/t4060-diff-submodule-option-diff-format.sh @@ -35,8 +35,12 @@ add_file () { test_tick && # "git commit -m" would break MinGW, as Windows refuse to pass # $test_encoding encoded parameter to git. - echo "Add $name ($added $name)" | iconv -f utf-8 -t $test_encoding | - git -c "i18n.commitEncoding=$test_encoding" commit -F - + message="Add $name ($added $name)" && + if test_have_prereq ICONV + then + message=$(echo "$message" | iconv -f utf-8 -t $test_encoding) + fi && + echo "$message" | git -c "i18n.commitEncoding=$test_encoding" commit -F - done >/dev/null && git rev-parse --short --verify HEAD ) |
