diff options
-rwxr-xr-x | t/t3600-rm.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index 73772b2790..a2e1a03965 100755 --- a/t/t3600-rm.sh +++ b/t/t3600-rm.sh @@ -647,4 +647,16 @@ test_expect_success SYMLINKS 'rm of d/f when d has become a dangling symlink' ' test_path_is_missing d ' +test_expect_success 'rm of file when it has become a directory' ' + rm -rf d && + >d && + git add d && + rm -f d && + mkdir d && + >d/f && + test_must_fail git rm d && + git rev-parse --verify :d && + test_path_is_file d/f +' + test_done |