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: https://git.lorimer.id.au/gitweb.git/diff_plain/cbcd2cbd5942cc890c1a1125593e1108c3e6a077?hp=--cc 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 --- cbcd2cbd5942cc890c1a1125593e1108c3e6a077 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