summaryrefslogtreecommitdiff
path: root/t/t6022-merge-rename.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2011-08-12 05:20:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-14 21:19:37 (GMT)
commit51931bf08e7de1f597d36bc2fd38b5310b6da7dd (patch)
tree1b3bc720ea90fe1bbc4609de02c680f02a0134d9 /t/t6022-merge-rename.sh
parent7769a75e96f998b2f1ef51e8a2e88058f56fa519 (diff)
downloadgit-51931bf08e7de1f597d36bc2fd38b5310b6da7dd.zip
git-51931bf08e7de1f597d36bc2fd38b5310b6da7dd.tar.gz
git-51931bf08e7de1f597d36bc2fd38b5310b6da7dd.tar.bz2
merge-recursive: Improve handling of rename target vs. directory addition
When dealing with file merging and renames and D/F conflicts and possible criss-cross merges (how's that for a corner case?), we did not do a thorough job ensuring the index and working directory had the correct contents. Fix the logic in merge_content() to handle this. Also, correct some erroneous tests in t6022 that were expecting the wrong number of unmerged index entries. These changes fix one of the tests in t6042 (and almost fix another one from t6042 as well). Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6022-merge-rename.sh')
-rwxr-xr-xt/t6022-merge-rename.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t6022-merge-rename.sh b/t/t6022-merge-rename.sh
index 6ff4bd2..fcc1d4c 100755
--- a/t/t6022-merge-rename.sh
+++ b/t/t6022-merge-rename.sh
@@ -307,7 +307,7 @@ test_expect_success 'Rename+D/F conflict; renamed file merges but dir in way' '
grep "Auto-merging dir" output &&
grep "Adding as dir~HEAD instead" output &&
- test 2 -eq "$(git ls-files -u | wc -l)" &&
+ test 3 -eq "$(git ls-files -u | wc -l)" &&
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
test_must_fail git diff --quiet &&
@@ -329,7 +329,7 @@ test_expect_success 'Same as previous, but merged other way' '
grep "Auto-merging dir" output &&
grep "Adding as dir~renamed-file-has-no-conflicts instead" output &&
- test 2 -eq "$(git ls-files -u | wc -l)" &&
+ test 3 -eq "$(git ls-files -u | wc -l)" &&
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
test_must_fail git diff --quiet &&