summaryrefslogtreecommitdiff
path: root/t/t3600-rm.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-07-19 11:28:06 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-07-19 11:28:06 -0700
commit679639904da05f7d84e9215960e76dd0f3353328 (patch)
treea60e891d49b1de93d135fd5d79171f4c09b98040 /t/t3600-rm.sh
parentSupport gitlinks in fast-import. (diff)
parentGIT 1.5.6.4 (diff)
downloadtgif-679639904da05f7d84e9215960e76dd0f3353328.tar.xz
Merge branch 'maint'
* maint: GIT 1.5.6.4 builtin-rm: fix index lock file path http-fetch: do not SEGV after fetching a bad pack idx file rev-list: honor --quiet option api-run-command.txt: typofix
Diffstat (limited to 't/t3600-rm.sh')
-rwxr-xr-xt/t3600-rm.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 316775ecd9..79c06adf1f 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -217,4 +217,16 @@ test_expect_success 'Remove nonexistent file returns nonzero exit status' '
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