3 test_description
='git status and symlinks'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'setup' '
9 echo .gitignore >.gitignore &&
10 echo actual >>.gitignore &&
11 echo expect >>.gitignore &&
16 git commit -m initial &&
20 test_expect_success SYMLINKS
'symlink to a directory' '
21 test_when_finished "rm symlink" &&
23 echo "?? symlink" >expect &&
24 git status --porcelain >actual &&
25 test_cmp expect actual
28 test_expect_success SYMLINKS
'symlink replacing a directory' '
29 test_when_finished "rm -rf copy && git reset --hard initial" &&
31 cp dir/file1 copy/file1 &&
32 echo "changed in copy" >copy/file2 &&
34 git commit -m second &&
37 echo " D copy/file1" >expect &&
38 echo " D copy/file2" >>expect &&
39 echo "?? copy" >>expect &&
40 git status --porcelain >actual &&
41 test_cmp expect actual