diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-03-10 14:23:17 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-10 14:23:17 -0700 |
| commit | 9a8aebae972de22ecd5adb92fec9d77147949c8a (patch) | |
| tree | de2a54941699c4856071e6536966af4ba8f2ac5f /t/t4014-format-patch.sh | |
| parent | d181b9354cf85b44455ce3ca9e6af0b9559e0ae2 (diff) | |
| parent | ea3a62c40ef2d31a6ab87ae3b8be46690d549b58 (diff) | |
| download | git-9a8aebae972de22ecd5adb92fec9d77147949c8a.tar.xz | |
Merge branch 'kh/format-patch-noprefix-is-boolean'
The configuration variable format.noprefix did not behave as a
proper boolean variable, which has now been fixed and documented.
* kh/format-patch-noprefix-is-boolean:
doc: diff-options.adoc: make *.noprefix split translatable
doc: diff-options.adoc: show format.noprefix for format-patch
format-patch: make format.noprefix a boolean
Diffstat (limited to 't/t4014-format-patch.sh')
| -rwxr-xr-x | t/t4014-format-patch.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 2135b65cee..bcdb944017 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -2549,10 +2549,26 @@ test_expect_success 'format-patch respects format.noprefix' ' grep "^--- blorp" actual ' +test_expect_success 'format.noprefix=false' ' + git -c format.noprefix=false format-patch -1 --stdout >actual && + grep "^--- a/blorp" actual +' + test_expect_success 'format-patch --default-prefix overrides format.noprefix' ' git -c format.noprefix \ format-patch -1 --default-prefix --stdout >actual && grep "^--- a/blorp" actual ' +test_expect_success 'errors on format.noprefix which is not boolean' ' + cat >expect <<-EOF && + fatal: bad boolean config value ${SQ}not-a-bool${SQ} for ${SQ}format.noprefix${SQ} + hint: ${SQ}format.noprefix${SQ} used to accept any value and treat that as ${SQ}true${SQ}. + hint: Now it only accepts boolean values, like what ${SQ}diff.noprefix${SQ} does. + EOF + test_must_fail git -c format.noprefix=not-a-bool \ + format-patch -1 --stdout 2>actual && + test_cmp expect actual +' + test_done |
