summaryrefslogtreecommitdiff
path: root/t/t3415-rebase-autosquash.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-07-14 14:45:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-27 22:35:05 (GMT)
commitb174ae7df2aa196beefca605f2df778ad15b6ad7 (patch)
tree82d1ac12b3e1b0a5dcd286a27bec149569c0ec03 /t/t3415-rebase-autosquash.sh
parentcdac2b01ff77d32305610aeb26396e25bffa9dba (diff)
downloadgit-b174ae7df2aa196beefca605f2df778ad15b6ad7.zip
git-b174ae7df2aa196beefca605f2df778ad15b6ad7.tar.gz
git-b174ae7df2aa196beefca605f2df778ad15b6ad7.tar.bz2
t3415: test fixup with wrapped oneline
The `git commit --fixup` command unwraps wrapped onelines when constructing the commit message, without wrapping the result. We need to make sure that `git rebase --autosquash` keeps handling such cases correctly, in particular since we are about to move the autosquash handling into the rebase--helper. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3415-rebase-autosquash.sh')
-rwxr-xr-xt/t3415-rebase-autosquash.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 6d99f62..62cb977 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -316,4 +316,18 @@ test_expect_success 'extra spaces after fixup!' '
test $base = $parent
'
+test_expect_success 'wrapped original subject' '
+ if test -d .git/rebase-merge; then git rebase --abort; fi &&
+ base=$(git rev-parse HEAD) &&
+ echo "wrapped subject" >wrapped &&
+ git add wrapped &&
+ test_tick &&
+ git commit --allow-empty -m "$(printf "To\nfixup")" &&
+ test_tick &&
+ git commit --allow-empty -m "fixup! To fixup" &&
+ git rebase -i --autosquash --keep-empty HEAD~2 &&
+ parent=$(git rev-parse HEAD^) &&
+ test $base = $parent
+'
+
test_done