This test creates two directories, a/b and a/b-2, replaces a/b-2 with a symlink to a/b, then merges that change into another branch that contains unrelated changes. Since the changes are unrelated, the merge should be free of conflicts, but 'git merge' gives a file/directory conflict. Note that this test is almost identical to t6035, except that instead of replacing a/b with a symlink, it replaces a/b-2 with a symlink. This test results in a merge conflict, whereas t6035 does not. Signed-off-by: James Pickens <james.e.pickens@xxxxxxxxx> --- t/t6036-merge-dir-to-symlink.sh | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) create mode 100755 t/t6036-merge-dir-to-symlink.sh diff --git a/t/t6036-merge-dir-to-symlink.sh b/t/t6036-merge-dir-to-symlink.sh new file mode 100755 index 0000000..020db7c --- /dev/null +++ b/t/t6036-merge-dir-to-symlink.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +test_description='merging when a directory was replaced with a symlink' +. ./test-lib.sh + +test_expect_success setup ' + mkdir -p a/b/c a/b-2/c && + > a/b/c/d && + > a/b-2/c/d && + > a/x && + git add -A && + git commit -m base && + rm -rf a/b-2 && + ln -s b a/b-2 && + git add -A && + git commit -m "dir to symlink" +' + +test_expect_failure 'checkout should not delete a/b/c/d' ' + git checkout -b temp HEAD^ && + test -f a/b/c/d +' + +test_expect_failure 'merge should not have conflicts' ' + echo x > a/x && + git add a/x && + git commit -m x && + git merge master' + +test_done -- 1.6.2.5.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html