summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2018-06-30 18:25:00 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-07-11 09:38:36 -0700
commite1f8694f3394caf3d3cd57c6c7593f0b0cdb1f9e (patch)
treedd07179f9af2ebd29a518d3553ea061ceb099b77 /t
parentmerge-recursive: make sure when we say we abort that we actually abort (diff)
downloadtgif-e1f8694f3394caf3d3cd57c6c7593f0b0cdb1f9e.tar.xz
merge-recursive: fix assumption that head tree being merged is HEAD
`git merge-recursive` does a three-way merge between user-specified trees base, head, and remote. Since the user is allowed to specify head, we can not necesarily assume that head == HEAD. Modify index_has_changes() to take an extra argument specifying the tree to compare against. If NULL, it will compare to HEAD. We then use this from merge-recursive to make sure we compare to the user-specified head. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t6044-merge-unrelated-index-changes.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6044-merge-unrelated-index-changes.sh b/t/t6044-merge-unrelated-index-changes.sh
index d55f1649f0..ef8a502baf 100755
--- a/t/t6044-merge-unrelated-index-changes.sh
+++ b/t/t6044-merge-unrelated-index-changes.sh
@@ -126,7 +126,7 @@ test_expect_success 'recursive, when merge branch matches merge base' '
test_path_is_missing .git/MERGE_HEAD
'
-test_expect_failure 'merge-recursive, when index==head but head!=HEAD' '
+test_expect_success 'merge-recursive, when index==head but head!=HEAD' '
git reset --hard &&
git checkout C^0 &&