diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2018-08-15 11:41:25 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-15 19:50:24 +0200 |
commit | dd2e36ebaccd6dc2ca4d37759248ce9bbdf9113e (patch) | |
tree | a64918927a3d015344978c1628b0556b1adcd1c0 /t/t3418-rebase-continue.sh | |
parent | rebase --skip: clean up commit message after a failed fixup/squash (diff) | |
download | git-dd2e36ebaccd6dc2ca4d37759248ce9bbdf9113e.tar.xz git-dd2e36ebaccd6dc2ca4d37759248ce9bbdf9113e.zip |
rebase -i: fix numbering in squash message
Commit e12a7ef597 ("rebase -i: Handle "combination of <n> commits" with
GETTEXT_POISON", 2018-04-27) changed the way that individual commit
messages are labelled when squashing commits together. In doing so a
regression was introduced where the numbering of the messages is off by
one. This commit fixes that and adds a test for the numbering.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3418-rebase-continue.sh')
-rwxr-xr-x | t/t3418-rebase-continue.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh index e9fd029160..ee871dd1bb 100755 --- a/t/t3418-rebase-continue.sh +++ b/t/t3418-rebase-continue.sh @@ -128,13 +128,15 @@ test_expect_success '--skip after failed fixup cleans commit message' ' : The first squash was skipped, therefore: && git show HEAD >out && test_i18ngrep "# This is a combination of 2 commits" out && + test_i18ngrep "# This is the commit message #2:" out && (test_set_editor "$PWD/copy-editor.sh" && git rebase --skip) && git show HEAD >out && test_i18ngrep ! "# This is a combination" out && : Final squash failed, but there was still a squash && - test_i18ngrep "# This is a combination of 2 commits" .git/copy.txt + test_i18ngrep "# This is a combination of 2 commits" .git/copy.txt && + test_i18ngrep "# This is the commit message #2:" .git/copy.txt ' test_expect_success 'setup rerere database' ' |