diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-11-12 23:25:58 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-13 03:04:00 (GMT) |
commit | 85f8d9da2182690461e05034a4a697f766bb8eb1 (patch) | |
tree | 22fa8db06b0a2edab4274d12c6ab73b4395018af /t | |
parent | f08110ddd84438f4a8d69c145fae7f65fc91940f (diff) | |
download | git-85f8d9da2182690461e05034a4a697f766bb8eb1.zip git-85f8d9da2182690461e05034a4a697f766bb8eb1.tar.gz git-85f8d9da2182690461e05034a4a697f766bb8eb1.tar.bz2 |
rebase -r: do not write MERGE_HEAD unless needed
When we detect that a `merge` can be skipped because the merged commit
is already an ancestor of HEAD, we do not need to commit, therefore
writing the MERGE_HEAD file is useless.
It is actually worse than useless: a subsequent `git commit` will pick
it up and think that we want to merge that commit, still.
To avoid that, move the code that writes the MERGE_HEAD file to a
location where we already know that the `merge` cannot be skipped.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3430-rebase-merges.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index 1f08a33..cc56468 100755 --- a/t/t3430-rebase-merges.sh +++ b/t/t3430-rebase-merges.sh @@ -396,7 +396,7 @@ test_expect_success 'with --autosquash and --exec' ' grep "G: +G" actual ' -test_expect_failure '--continue after resolving conflicts after a merge' ' +test_expect_success '--continue after resolving conflicts after a merge' ' git checkout -b already-has-g E && git cherry-pick E..G && test_commit H2 && |