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>
Johannes Schindelin committed
Jul 7, 2016 at 17:52 UTC
cbcd2cbd5942cc890c1a1125593e1108c3e6a077
1 file changed
+9
t/t3415-rebase-autosquash.sh
+9
@@ -295,4 +295,13 @@ test_expect_failure 'autosquash with multiple empty patches' '
295
)
296
'
297
298
+test_expect_success 'extra spaces after fixup!' '
299
+ base=$(git rev-parse HEAD) &&
300
+ test_commit to-fixup &&
301
+ git commit --allow-empty -m "fixup! to-fixup" &&
302
+ git rebase -i --autosquash --keep-empty HEAD~2 &&
303
+ parent=$(git rev-parse HEAD^) &&
304
+ test $base = $parent
305
+'
306
+
307
test_done