diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-06-13 13:19:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-13 13:19:43 -0700 |
commit | c51026115481834a1e0f49a2dafc1ce86025889c (patch) | |
tree | 90967e8a7b8d6c9172c425fbb6ee958af230d2fc /t | |
parent | Merge branch 'ab/deprecate-R-for-dynpath' (diff) | |
parent | rebase -r: always reword merge -c (diff) | |
download | tgif-c51026115481834a1e0f49a2dafc1ce86025889c.tar.xz |
Merge branch 'pw/rebase-edit-message-for-replayed-merge'
A "merge -c" instruction during "git rebase --rebase-merges" should
give the user a chance to edit the log message, even when there is
otherwise no need to create a new merge and replace the existing
one (i.e. fast-forward instead), but did not. Which has been
corrected.
* pw/rebase-edit-message-for-replayed-merge:
rebase -r: always reword merge -c
Diffstat (limited to 't')
-rwxr-xr-x | t/t3430-rebase-merges.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index 42ba5b9f09..2315649f43 100755 --- a/t/t3430-rebase-merges.sh +++ b/t/t3430-rebase-merges.sh @@ -164,6 +164,19 @@ test_expect_success 'failed `merge <branch>` does not crash' ' grep "^Merge branch ${SQ}G${SQ}$" .git/rebase-merge/message ' +test_expect_success 'fast-forward merge -c still rewords' ' + git checkout -b fast-forward-merge-c H && + ( + set_fake_editor && + FAKE_COMMIT_MESSAGE=edited \ + GIT_SEQUENCE_EDITOR="echo merge -c H G >" \ + git rebase -ir @^ + ) && + echo edited >expected && + git log --pretty=format:%B -1 >actual && + test_cmp expected actual +' + test_expect_success 'with a branch tip that was cherry-picked already' ' git checkout -b already-upstream master && base="$(git rev-parse --verify HEAD)" && |