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:
authorElijah Newren <newren@gmail.com>2020-10-26 20:01:41 +0300
committerJunio C Hamano <gitster@pobox.com>2020-10-26 22:31:24 +0300
commitc8c35f6a02f3841d4383a5ce4c9d8e426776d151 (patch)
tree379488292d01fceabc6548854eb1e87b9e764d61 /t/t6437-submodule-merge.sh
parentc12d1f2ac227cbec44be27de83ef07d135f243c2 (diff)
merge tests: expect slight differences in output for recursive vs. ort
The ort merge strategy has some slight differences in commit descriptions (shortened hashes), stdout vs stderr, and in conflict messages. Also, builtin/merge.c reports usage of "ort" as "Merge made by the 'ort' strategy" -- while it is meant as a drop in replacement for "recursive" it is not yet treated as though it is recursive. Update the testcases to expect different output for the different merge backends. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6437-submodule-merge.sh')
-rwxr-xr-xt/t6437-submodule-merge.sh25
1 files changed, 21 insertions, 4 deletions
diff --git a/t/t6437-submodule-merge.sh b/t/t6437-submodule-merge.sh
index 6a1e5f8232..3ead2b726f 100755
--- a/t/t6437-submodule-merge.sh
+++ b/t/t6437-submodule-merge.sh
@@ -127,7 +127,12 @@ test_expect_success 'merging should conflict for non fast-forward' '
git checkout -b test-nonforward b &&
(cd sub &&
git rev-parse sub-d > ../expect) &&
- test_must_fail git merge c 2> actual &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ test_must_fail git merge c >actual
+ else
+ test_must_fail git merge c 2> actual
+ fi &&
grep $(cat expect) actual > /dev/null &&
git reset --hard)
'
@@ -138,9 +143,21 @@ test_expect_success 'merging should fail for ambiguous common parent' '
(cd sub &&
git checkout -b ambiguous sub-b &&
git merge sub-c &&
- git rev-parse sub-d > ../expect1 &&
- git rev-parse ambiguous > ../expect2) &&
- test_must_fail git merge c 2> actual &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ git rev-parse --short sub-d >../expect1 &&
+ git rev-parse --short ambiguous >../expect2
+ else
+ git rev-parse sub-d > ../expect1 &&
+ git rev-parse ambiguous > ../expect2
+ fi
+ ) &&
+ if test "$GIT_TEST_MERGE_ALGORITHM" = ort
+ then
+ test_must_fail git merge c >actual
+ else
+ test_must_fail git merge c 2> actual
+ fi &&
grep $(cat expect1) actual > /dev/null &&
grep $(cat expect2) actual > /dev/null &&
git reset --hard)