summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-07-07 15:52:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-07 22:40:59 (GMT)
commitcbcd2cbd5942cc890c1a1125593e1108c3e6a077 (patch)
treea0e5ac422b70e53dd1fb4082e8699e0b3fe658b0
parentc94e963b537be0371d4616ec4806b01b477feae0 (diff)
downloadgit-cbcd2cbd5942cc890c1a1125593e1108c3e6a077.zip
git-cbcd2cbd5942cc890c1a1125593e1108c3e6a077.tar.gz
git-cbcd2cbd5942cc890c1a1125593e1108c3e6a077.tar.bz2
rebase -i: we allow extra spaces after fixup!/squash!
This new test case ensures that we handle commit messages that start with fixup! or squash! followed by more than one space. While we do not generate such messages when committing with --fixup/--squash, it is perfectly legal for users to hand-craft their own fixup messages, and we heed Postel's law by being lenient. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t3415-rebase-autosquash.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 9b71a49..48346f1 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -295,4 +295,13 @@ test_expect_failure 'autosquash with multiple empty patches' '
)
'
+test_expect_success 'extra spaces after fixup!' '
+ base=$(git rev-parse HEAD) &&
+ test_commit to-fixup &&
+ 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