3 test_description
='merging when a directory was replaced with a symlink'
6 test_expect_success
'create a commit where dir a/b changed to symlink' '
7 mkdir -p a/b/c a/b-2/c &&
17 git commit -m "dir to symlink"
20 test_expect_success
'keep a/b-2/c/d across checkout' '
21 git checkout HEAD^0 &&
22 git reset --hard master &&
23 git rm --cached a/b &&
24 git commit -m "untracked symlink remains" &&
25 git checkout start^0 &&
29 test_expect_success
'checkout should not have deleted a/b-2/c/d' '
30 git checkout HEAD^0 &&
31 git reset --hard master &&
32 git checkout start^0 &&
36 test_expect_success
'setup for merge test' '
45 test_expect_success
'do not lose a/b-2/c/d in merge (resolve)' '
47 git checkout baseline^0 &&
48 git merge -s resolve master &&
53 test_expect_failure
'do not lose a/b-2/c/d in merge (recursive)' '
55 git checkout baseline^0 &&
56 git merge -s recursive master &&
61 test_expect_success
'setup a merge where dir a/b-2 changed to symlink' '
63 git checkout start^0 &&
67 git commit -m "dir a/b-2 to symlink" &&
71 test_expect_failure
'merge should not have conflicts (resolve)' '
73 git checkout baseline^0 &&
74 git merge -s resolve test2 &&
79 test_expect_failure
'merge should not have conflicts (recursive)' '
81 git checkout baseline^0 &&
82 git merge -s recursive test2 &&