summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-12-06 09:09:01 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-12-06 09:09:01 -0800
commit3cc60ecdda7729496c3605449176000cc11412b6 (patch)
treee5b632ae4cde54995a6538aef086fb5ce75d79c4 /t
parentMerge branch 'sd/branch-copy' into maint (diff)
parentrebase: use mboxrd format to avoid split errors (diff)
downloadtgif-3cc60ecdda7729496c3605449176000cc11412b6.tar.xz
Merge branch 'ew/rebase-mboxrd' into maint
When "git rebase" prepared an mailbox of changes and fed it to "git am" to replay them, it was confused when a stray "From " happened to be in the log message of one of the replayed changes. This has been corrected. * ew/rebase-mboxrd: rebase: use mboxrd format to avoid split errors
Diffstat (limited to 't')
-rwxr-xr-xt/t3400-rebase.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index f5fd15e559..8ac58d5ea5 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -255,4 +255,26 @@ test_expect_success 'rebase commit with an ancient timestamp' '
grep "author .* 34567 +0600$" actual
'
+test_expect_success 'rebase with "From " line in commit message' '
+ git checkout -b preserve-from master~1 &&
+ cat >From_.msg <<EOF &&
+Somebody embedded an mbox in a commit message
+
+This is from so-and-so:
+
+From a@b Mon Sep 17 00:00:00 2001
+From: John Doe <nobody@example.com>
+Date: Sat, 11 Nov 2017 00:00:00 +0000
+Subject: not this message
+
+something
+EOF
+ >From_ &&
+ git add From_ &&
+ git commit -F From_.msg &&
+ git rebase master &&
+ git log -1 --pretty=format:%B >out &&
+ test_cmp From_.msg out
+'
+
test_done