diff options
author | Thomas Rast <trast@student.ethz.ch> | 2012-01-16 11:53:00 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-16 16:04:52 -0800 |
commit | f7e5ea171b693bf5fc88e059d9d4af3753c09143 (patch) | |
tree | 537dd1c0308531783930497f6d9cf8777623b9a8 /t | |
parent | mailinfo documentation: accurately describe non -k case (diff) | |
download | tgif-f7e5ea171b693bf5fc88e059d9d4af3753c09143.tar.xz |
am: learn passing -b to mailinfo
git-am could pass -k to mailinfo, but not -b. Introduce an option
that does so. We change the meaning of the 'keep' state file, but are
careful not to cause a problem unless you downgrade in the middle of
an 'am' run.
This uncovers a bug in mailinfo -b, hence the failing test.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4150-am.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 850fc96d1f..efcff3c51d 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -219,7 +219,7 @@ test_expect_success 'am stays in branch' ' test_expect_success 'am --signoff does not add Signed-off-by: line if already there' ' git format-patch --stdout HEAD^ >patch3 && - sed -e "/^Subject/ s,\[PATCH,Re: Re: Re: & 1/5 v2," patch3 >patch4 && + sed -e "/^Subject/ s,\[PATCH,Re: Re: Re: & 1/5 v2] [foo," patch3 >patch4 && rm -fr .git/rebase-apply && git reset --hard && git checkout HEAD^ && @@ -241,7 +241,17 @@ test_expect_success 'am --keep really keeps the subject' ' git am --keep patch4 && ! test -d .git/rebase-apply && git cat-file commit HEAD >actual && - grep "Re: Re: Re: \[PATCH 1/5 v2\] third" actual + grep "Re: Re: Re: \[PATCH 1/5 v2\] \[foo\] third" actual +' + +test_expect_failure 'am --keep-non-patch really keeps the non-patch part' ' + rm -fr .git/rebase-apply && + git reset --hard && + git checkout HEAD^ && + git am --keep-non-patch patch4 && + ! test -d .git/rebase-apply && + git cat-file commit HEAD >actual && + grep "^\[foo\] third" actual ' test_expect_success 'am -3 falls back to 3-way merge' ' |