diff options
author | Elijah Newren <newren@gmail.com> | 2011-08-12 07:20:22 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-14 23:19:39 +0200 |
commit | 3672c971483020ba5255576aec0be670c76d019b (patch) | |
tree | ae5d39fd2a1a1272a5e8c72ac71c99920f950461 /t/t6042-merge-rename-corner-cases.sh | |
parent | merge-recursive: add handling for rename/rename/add-dest/add-dest (diff) | |
download | git-3672c971483020ba5255576aec0be670c76d019b.tar.xz git-3672c971483020ba5255576aec0be670c76d019b.zip |
merge-recursive: Fix working copy handling for rename/rename/add/add
If either side of a rename/rename(1to2) conflict is itself also involved
in a rename/add-dest conflict, then we need to make sure both the rename
and the added file appear in the working copy.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6042-merge-rename-corner-cases.sh')
-rwxr-xr-x | t/t6042-merge-rename-corner-cases.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t6042-merge-rename-corner-cases.sh b/t/t6042-merge-rename-corner-cases.sh index 6875919912..32591f9413 100755 --- a/t/t6042-merge-rename-corner-cases.sh +++ b/t/t6042-merge-rename-corner-cases.sh @@ -558,12 +558,21 @@ test_expect_success 'rename/rename/add-dest merge still knows about conflicting test 5 -eq $(git ls-files -s | wc -l) && test 2 -eq $(git ls-files -u b | wc -l) && test 2 -eq $(git ls-files -u c | wc -l) && + test 4 -eq $(git ls-files -o | wc -l) && test $(git rev-parse :1:a) = $(git rev-parse A:a) && test $(git rev-parse :2:b) = $(git rev-parse C:b) && test $(git rev-parse :3:b) = $(git rev-parse B:b) && test $(git rev-parse :2:c) = $(git rev-parse C:c) && - test $(git rev-parse :3:c) = $(git rev-parse B:c) + test $(git rev-parse :3:c) = $(git rev-parse B:c) && + + test $(git hash-object c~HEAD) = $(git rev-parse C:c) && + test $(git hash-object c~B\^0) = $(git rev-parse B:c) && + test $(git hash-object b~HEAD) = $(git rev-parse C:b) && + test $(git hash-object b~B\^0) = $(git rev-parse B:b) && + + test ! -f b && + test ! -f c ' test_done |