diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2008-03-02 15:53:04 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-02 15:27:08 -0800 |
commit | 5d02294c776c46f0d454470c66c16fe9f08fad3d (patch) | |
tree | f30963dac3a72151ea97a3293157a2eb2cdf433f /t | |
parent | gitweb: Mark first match when searching commit messages (diff) | |
download | tgif-5d02294c776c46f0d454470c66c16fe9f08fad3d.tar.xz |
format-patch: use the diff options for the cover letter, too
Earlier, when you called "git format-patch --cover-letter -M", the
diffstat in the cover letter would not inherit the "-M". Now it does.
While at it, add a few "|| break" statements in the test's loops;
otherwise, breakages inside the loops would not be caught.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4014-format-patch.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 16aa99dc0d..6d86b7dd72 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -147,7 +147,7 @@ test_expect_success 'thread' ' for i in patches/0002-* patches/0003-* do grep "References: $FIRST_MID" $i && - grep "In-Reply-To: $FIRST_MID" $i + grep "In-Reply-To: $FIRST_MID" $i || break done ' @@ -160,7 +160,7 @@ test_expect_success 'thread in-reply-to' ' for i in patches/* do grep "References: $FIRST_MID" $i && - grep "In-Reply-To: $FIRST_MID" $i + grep "In-Reply-To: $FIRST_MID" $i || break done ' @@ -173,7 +173,7 @@ test_expect_success 'thread cover-letter' ' for i in patches/0001-* patches/0002-* patches/0003-* do grep "References: $FIRST_MID" $i && - grep "In-Reply-To: $FIRST_MID" $i + grep "In-Reply-To: $FIRST_MID" $i || break done ' @@ -186,7 +186,7 @@ test_expect_success 'thread cover-letter in-reply-to' ' for i in patches/* do grep "References: $FIRST_MID" $i && - grep "In-Reply-To: $FIRST_MID" $i + grep "In-Reply-To: $FIRST_MID" $i || break done ' @@ -201,4 +201,14 @@ test_expect_success 'excessive subject' ' ls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch ' +test_expect_success 'cover-letter inherits diff options' ' + + git mv file foo && + git commit -m foo && + git format-patch --cover-letter -1 && + ! grep "file => foo .* 0 *$" 0000-cover-letter.patch && + git format-patch --cover-letter -1 -M && + grep "file => foo .* 0 *$" 0000-cover-letter.patch + +' test_done |