diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-07-07 17:52:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-07 15:40:59 -0700 |
commit | cbcd2cbd5942cc890c1a1125593e1108c3e6a077 (patch) | |
tree | a0e5ac422b70e53dd1fb4082e8699e0b3fe658b0 | |
parent | c94e963b537be0371d4616ec4806b01b477feae0 (diff) | |
download | git-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-x | t/t3415-rebase-autosquash.sh | 9 |
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 |