Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-11-13 02:25:57 +0300
committerJunio C Hamano <gitster@pobox.com>2018-11-13 06:04:00 +0300
commitf08110ddd84438f4a8d69c145fae7f65fc91940f (patch)
tree20a24c3caf03a01c058a526eb8a95d7eccc1c576 /t/t3430-rebase-merges.sh
parent8858448bb49332d353febc078ce4a3abcc962efe (diff)
rebase -r: demonstrate bug with conflicting merges
When calling `merge` on a branch that has already been merged, that `merge` is skipped quietly, but currently a MERGE_HEAD file is being left behind and will then be grabbed by the next `pick` (that did not want to create a *merge* commit). Demonstrate this. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3430-rebase-merges.sh')
-rwxr-xr-xt/t3430-rebase-merges.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh
index aa7bfc88ec..1f08a33687 100755
--- a/t/t3430-rebase-merges.sh
+++ b/t/t3430-rebase-merges.sh
@@ -396,4 +396,20 @@ test_expect_success 'with --autosquash and --exec' '
grep "G: +G" actual
'
+test_expect_failure '--continue after resolving conflicts after a merge' '
+ git checkout -b already-has-g E &&
+ git cherry-pick E..G &&
+ test_commit H2 &&
+
+ git checkout -b conflicts-in-merge H &&
+ test_commit H2 H2.t conflicts H2-conflict &&
+ test_must_fail git rebase -r already-has-g &&
+ grep conflicts H2.t &&
+ echo resolved >H2.t &&
+ git add -u &&
+ git rebase --continue &&
+ test_must_fail git rev-parse --verify HEAD^2 &&
+ test_path_is_missing .git/MERGE_HEAD
+'
+
test_done