summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-10-07 16:08:21 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-10-08 14:04:44 (GMT)
commitcced48a808620d60e95a1e51254b135a46ddf719 (patch)
treea377d8f23f86b27a00f88fc78e2b36e2411e93d0 /t
parentdaf6c2edc21ae1f018ef3829294024fc10756c8c (diff)
downloadgit-cced48a808620d60e95a1e51254b135a46ddf719.zip
git-cced48a808620d60e95a1e51254b135a46ddf719.tar.gz
git-cced48a808620d60e95a1e51254b135a46ddf719.tar.bz2
git rm: refresh index before up-to-date check
Since "git rm" is supposed to be porcelain, we should convince it to be user friendly by refreshing the index itself. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 't')
-rwxr-xr-xt/t3600-rm.sh25
1 files changed, 17 insertions, 8 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 558c80e..66aca99 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -219,14 +219,23 @@ test_expect_success 'Remove nonexistent file returns nonzero exit status' '
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
+ (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_expect_success 'refresh index before checking if it is up-to-date' '
+
+ git reset --hard &&
+ test-chmtime -86400 frotz/nitfol &&
+ git rm frotz/nitfol &&
+ test ! -f frotz/nitfol
+
'
test_done