summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-07-07 17:52:57 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-07 15:40:59 -0700
commitcbcd2cbd5942cc890c1a1125593e1108c3e6a077 (patch)
treea0e5ac422b70e53dd1fb4082e8699e0b3fe658b0
parentc94e963b537be0371d4616ec4806b01b477feae0 (diff)
downloadgit-js/rebase-i-tests.tar.gz
rebase -i: we allow extra spaces after fixup!/squash!js/rebase-i-tests
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 9b71a49f02..48346f1cc0 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