summaryrefslogtreecommitdiff
path: root/t/t4150-am.sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-04-01 19:14:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-11 07:49:40 (GMT)
commitfd1062e52e1a7ed3be443a320708ed849958c1bf (patch)
tree3b80272b10bf546ef31dda81112acaea053d113e /t/t4150-am.sh
parent4cff50b3fb50940e57dc10769b2f92d5cec1a05a (diff)
downloadgit-fd1062e52e1a7ed3be443a320708ed849958c1bf.zip
git-fd1062e52e1a7ed3be443a320708ed849958c1bf.tar.gz
git-fd1062e52e1a7ed3be443a320708ed849958c1bf.tar.bz2
mailinfo: fix in-body header continuations
An empty line should stop any pending in-body headers, and start the actual body parsing. This also modifies the original test for the in-body headers to actually have a real commit body that starts with spaces, and changes the test to check that the long line matches _exactly_, and doesn't get extra data from the body. Fixes:6b4b013f1884 ("mailinfo: handle in-body header continuations") Cc: Jonathan Tan <jonathantanmy@google.com> Cc: Jeff King <peff@peff.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4150-am.sh')
-rwxr-xr-xt/t4150-am.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 89a5bac..44807e2 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -983,7 +983,9 @@ test_expect_success 'am works with multi-line in-body headers' '
rm -fr .git/rebase-apply &&
git checkout -f first &&
echo one >> file &&
- git commit -am "$LONG" --author="$LONG <long@example.com>" &&
+ git commit -am "$LONG
+
+ Body test" --author="$LONG <long@example.com>" &&
git format-patch --stdout -1 >patch &&
# bump from, date, and subject down to in-body header
perl -lpe "
@@ -997,7 +999,7 @@ test_expect_success 'am works with multi-line in-body headers' '
git am msg &&
# Ensure that the author and full message are present
git cat-file commit HEAD | grep "^author.*long@example.com" &&
- git cat-file commit HEAD | grep "^$LONG"
+ git cat-file commit HEAD | grep "^$LONG$"
'
test_done