| test_description='git status and symlinks' |
| test_expect_success 'setup' ' |
| echo .gitignore >.gitignore && |
| echo actual >>.gitignore && |
| echo expect >>.gitignore && |
| test_expect_success SYMLINKS 'symlink to a directory' ' |
| test_when_finished "rm symlink" && |
| echo "?? symlink" >expect && |
| git status --porcelain >actual && |
| test_expect_success SYMLINKS 'symlink replacing a directory' ' |
| test_when_finished "rm -rf copy && git reset --hard initial" && |
| cp dir/file1 copy/file1 && |
| echo "changed in copy" >copy/file2 && |
| echo " D copy/file1" >expect && |
| echo " D copy/file2" >>expect && |
| echo "?? copy" >>expect && |
| git status --porcelain >actual && |