git p4 test: copy source indeterminate
Msysgit testing showed that the source file found by copy detection is indeterminate when there are multiple sources to choose from. This appears to be valid. Adjust the test so that it passes if it finds any of the potential copy sources. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pete Wyckoff committed
Jun 27, 2012 at 08:01 UTC
f69b3a93ca8a0f2fb9a9075df943172e2aa5c718
1 file changed
+2
-2
t/t9800-git-p4-basic.sh
+2
-2
@@ -547,7 +547,7 @@ test_expect_success 'detect copies' '
547
level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C0*//") &&
548
test -n "$level" && test "$level" -gt 0 && test "$level" -lt 98 &&
549
src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
550
- test "$src" = file10 &&
550
+ test "$src" = file10 -o "$src" = file11 &&
551
git config git-p4.detectCopies $(($level + 2)) &&
552
git p4 submit &&
553
p4 filelog //depot/file12 &&
@@ -561,7 +561,7 @@ test_expect_success 'detect copies' '
561
level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C0*//") &&
562
test -n "$level" && test "$level" -gt 2 && test "$level" -lt 100 &&
563
src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
564
- test "$src" = file10 &&
564
+ test "$src" = file10 -o "$src" = file11 -o "$src" = file12 &&
565
git config git-p4.detectCopies $(($level - 2)) &&
566
git p4 submit &&
567
p4 filelog //depot/file13 &&