From: Johannes Schindelin Date: Thu, 7 Jul 2016 15:52:57 +0000 (+0200) Subject: rebase -i: we allow extra spaces after fixup!/squash! X-Git-Tag: v2.10.0-rc0~80^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cbcd2cbd5942cc890c1a1125593e1108c3e6a077;p=git-core%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh index 9b71a49f0..48346f1cc 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