3 test_description='git status and symlinks'
7 test_expect_success 'setup' '
8 echo .gitignore >.gitignore &&
9 echo actual >>.gitignore &&
10 echo expect >>.gitignore &&
15 git commit -m initial &&
19 test_expect_success SYMLINKS 'symlink to a directory' '
20 test_when_finished "rm symlink" &&
22 echo "?? symlink" >expect &&
23 git status --porcelain >actual &&
24 test_cmp expect actual
27 test_expect_success SYMLINKS 'symlink replacing a directory' '
28 test_when_finished "rm -rf copy && git reset --hard initial" &&
30 cp dir/file1 copy/file1 &&
31 echo "changed in copy" >copy/file2 &&
33 git commit -m second &&
36 echo " D copy/file1" >expect &&
37 echo " D copy/file2" >>expect &&
38 echo "?? copy" >>expect &&
39 git status --porcelain >actual &&
40 test_cmp expect actual