summaryrefslogtreecommitdiff
path: root/t/t7610-mergetool.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7610-mergetool.sh')
-rwxr-xr-xt/t7610-mergetool.sh32
1 files changed, 29 insertions, 3 deletions
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh
index ad288dd..70afdd0 100755
--- a/t/t7610-mergetool.sh
+++ b/t/t7610-mergetool.sh
@@ -532,7 +532,14 @@ test_expect_success 'file vs modified submodule' '
yes "" | git mergetool file1 file2 spaced\ name subdir/file3 &&
yes "" | git mergetool both &&
yes "d" | git mergetool file11 file12 &&
- yes "l" | git mergetool submod &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ yes "c" | git mergetool submod~HEAD &&
+ git rm submod &&
+ git mv submod~HEAD submod
+ else
+ yes "l" | git mergetool submod
+ fi &&
git submodule update -N &&
echo "not a submodule" >expect &&
test_cmp expect submod &&
@@ -549,7 +556,15 @@ test_expect_success 'file vs modified submodule' '
yes "" | git mergetool file1 file2 spaced\ name subdir/file3 &&
yes "" | git mergetool both &&
yes "d" | git mergetool file11 file12 &&
- yes "r" | git mergetool submod &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ mv submod submod.orig &&
+ git rm --cached submod &&
+ yes "c" | git mergetool submod~test19 &&
+ git mv submod~test19 submod
+ else
+ yes "r" | git mergetool submod
+ fi &&
test -d submod.orig &&
git submodule update -N &&
echo "not a submodule" >expect &&
@@ -567,6 +582,10 @@ test_expect_success 'file vs modified submodule' '
yes "" | git mergetool both &&
yes "d" | git mergetool file11 file12 &&
yes "l" | git mergetool submod &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ yes "d" | git mergetool submod~test19
+ fi &&
echo "master submodule" >expect &&
test_cmp expect submod/bar &&
git submodule update -N &&
@@ -664,7 +683,14 @@ test_expect_success 'directory vs modified submodule' '
test_must_fail git merge master &&
test -n "$(git ls-files -u)" &&
test ! -e submod.orig &&
- yes "r" | git mergetool submod &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ yes "r" | git mergetool submod~master &&
+ git mv submod submod.orig &&
+ git mv submod~master submod
+ else
+ yes "r" | git mergetool submod
+ fi &&
test -d submod.orig &&
echo "not a submodule" >expect &&
test_cmp expect submod.orig/file16 &&