3 test_description='merging when a directory was replaced with a symlink'
6 if ! test_have_prereq SYMLINKS
8 skip_all='Symbolic links not supported, skipping tests.'
12 test_expect_success 'create a commit where dir a/b changed to symlink' '
13 mkdir -p a/b/c a/b-2/c &&
23 git commit -m "dir to symlink"
26 test_expect_success 'keep a/b-2/c/d across checkout' '
27 git checkout HEAD^0 &&
28 git reset --hard master &&
29 git rm --cached a/b &&
30 git commit -m "untracked symlink remains" &&
31 git checkout start^0 &&
35 test_expect_success 'checkout should not have deleted a/b-2/c/d' '
36 git checkout HEAD^0 &&
37 git reset --hard master &&
38 git checkout start^0 &&
42 test_expect_success 'setup for merge test' '
51 test_expect_success 'do not lose a/b-2/c/d in merge (resolve)' '
53 git checkout baseline^0 &&
54 git merge -s resolve master &&
59 test_expect_failure 'do not lose a/b-2/c/d in merge (recursive)' '
61 git checkout baseline^0 &&
62 git merge -s recursive master &&
67 test_expect_success 'setup a merge where dir a/b-2 changed to symlink' '
69 git checkout start^0 &&
73 git commit -m "dir a/b-2 to symlink" &&
77 test_expect_success 'merge should not have conflicts (resolve)' '
79 git checkout baseline^0 &&
80 git merge -s resolve test2 &&
85 test_expect_failure 'merge should not have conflicts (recursive)' '
87 git checkout baseline^0 &&
88 git merge -s recursive test2 &&