diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 316775ecd96208c07f3211a24de2e5ec2ee409ab..79c06adf1f035cf727771974b2f9713da9d2fb8c 100755 (executable)
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
test_must_fail git rm nonexistent
'
+test_expect_success 'Call "rm" from outside the work tree' '
+ mkdir repo &&
+ cd repo &&
+ git init &&
+ echo something > somefile &&
+ git add somefile &&
+ git commit -m "add a file" &&
+ (cd .. &&
+ git --git-dir=repo/.git --work-tree=repo rm somefile) &&
+ test_must_fail git ls-files --error-unmatch somefile
+'
+
test_done