Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-11-18 04:01:16 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-18 06:30:16 +0300
commitae3b2b04bb88c8bbb298ceb5be634a3c0ba92159 (patch)
treed66bf94db6542255220fc460b1ad449c7dac2f9d /t/t3400-rebase.sh
parent5a1f5c3060427375de30d609d72ac032516be4c2 (diff)
rebase: use mboxrd format to avoid split errors
The mboxrd format allows the use of embedded "From " lines in commit messages without being misinterpreted by mailsplit Reported-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3400-rebase.sh')
-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