mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
![Ævar Arnfjörð Bjarmason](/assets/img/avatar_default.png)
Clear the "boundary_commits" object_array in release_revisions(). This makes a few more tests pass under SANITIZE=leak, including "t/t4126-apply-empty.sh" which started failed as an UNLEAK() in cmd_format_patch() was removed in a preceding commit. This also re-marks the various tests relying on "git format-patch" as passing under "SANITIZE=leak", in the preceding "revisions API users: use release_revisions() in builtin/log.c" commit those were marked as failing as we removed the UNLEAK(rev) from cmd_format_patch() in "builtin/log.c". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
33 lines
759 B
Bash
Executable file
33 lines
759 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='format-patch mime headers and extra headers do not conflict'
|
|
|
|
TEST_PASSES_SANITIZE_LEAK=true
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'create commit with utf-8 body' '
|
|
echo content >file &&
|
|
git add file &&
|
|
git commit -m one &&
|
|
echo more >>file &&
|
|
git commit -a -m "two
|
|
|
|
utf-8 body: ñ"
|
|
'
|
|
|
|
test_expect_success 'patch has mime headers' '
|
|
rm -f 0001-two.patch &&
|
|
git format-patch HEAD^ &&
|
|
grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
|
|
'
|
|
|
|
test_expect_success 'patch has mime and extra headers' '
|
|
rm -f 0001-two.patch &&
|
|
git config format.headers "x-foo: bar" &&
|
|
git format-patch HEAD^ &&
|
|
grep -i "x-foo: bar" 0001-two.patch &&
|
|
grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
|
|
'
|
|
|
|
test_done
|