summaryrefslogtreecommitdiff
path: root/t/t3600-rm.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3600-rm.sh')
-rwxr-xr-xt/t3600-rm.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 66aca99fd3..5b4d6f7138 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -187,6 +187,19 @@ test_expect_success 'but with -f it should work.' '
test_must_fail git ls-files --error-unmatch baz
'
+test_expect_failure 'refuse to remove cached empty file with modifications' '
+ touch empty &&
+ git add empty &&
+ echo content >empty &&
+ test_must_fail git rm --cached empty
+'
+
+test_expect_success 'remove intent-to-add file without --force' '
+ echo content >intent-to-add &&
+ git add -N intent-to-add
+ git rm --cached intent-to-add
+'
+
test_expect_success 'Recursive test setup' '
mkdir -p frotz &&
echo qfwfq >frotz/nitfol &&