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:
authorVitor Antunes <vitor.hda@gmail.com>2015-03-28 03:03:03 +0300
committerJunio C Hamano <gitster@pobox.com>2015-03-28 18:55:54 +0300
commit138ce9c29f622ea962ee3ed676dd137e20397fcf (patch)
tree1115e53f15d0ef09b109ad4bb4eb66a34621eca7 /t/t9814-git-p4-rename.sh
parent83e085a1f92e034ea70416cef3b75db7c0581ff3 (diff)
git-p4: fix copy detection test
File file11 is copied from file2 and diff-tree correctly reports this file as its the source. But it is possible that the diff-tree algorithm detects file10, which was also copied from file2, as the origin of the new file. This fix uses a case statement to support both files as the source of file11, as was done in other tests in this file. Signed-off-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9814-git-p4-rename.sh')
-rwxr-xr-xt/t9814-git-p4-rename.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh
index efae1436ed..8b9c2950e8 100755
--- a/t/t9814-git-p4-rename.sh
+++ b/t/t9814-git-p4-rename.sh
@@ -163,7 +163,10 @@ test_expect_success 'detect copies' '
git commit -a -m "Copy file2 to file11" &&
git diff-tree -r -C --find-copies-harder HEAD &&
src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
- test "$src" = file10 &&
+ case "$src" in
+ file2 | file10) : ;; # happy
+ *) false ;; # not
+ esac &&
git config git-p4.detectCopiesHarder true &&
git p4 submit &&
p4 filelog //depot/file11 &&