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>
This commit is contained in:
parent
c94e963b53
commit
cbcd2cbd59
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user