summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-10-30 12:10:09 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-10-30 12:10:09 -0700
commit504c1942a9b9dc6dd440bd18730f55e947dd9ce1 (patch)
tree9599b09ba2f2c6eff544c97557b0c9bf09675e29 /t
parentMerge branch 'fc/styles' (diff)
parentt3600: fix broken "choking git rm" test (diff)
downloadtgif-504c1942a9b9dc6dd440bd18730f55e947dd9ce1.tar.xz
Merge branch 'sg/t3600-nul-sha1-fix'
* sg/t3600-nul-sha1-fix: t3600: fix broken "choking git rm" test
Diffstat (limited to 't')
-rwxr-xr-xt/t3600-rm.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 639cb70941..540c49bab6 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -240,18 +240,15 @@ test_expect_success 'refresh index before checking if it is up-to-date' '
test_expect_success 'choking "git rm" should not let it die with cruft' '
git reset -q --hard &&
+ test_when_finished "rm -f .git/index.lock && git reset -q --hard" &&
i=0 &&
while test $i -lt 12000
do
- echo "100644 $_z40 0 some-file-$i"
+ echo "100644 1234567890123456789012345678901234567890 0 some-file-$i"
i=$(( $i + 1 ))
done | git update-index --index-info &&
- git rm -n "some-file-*" | :;
- test -f .git/index.lock
- status=$?
- rm -f .git/index.lock
- git reset -q --hard
- test "$status" != 0
+ git rm -n "some-file-*" | : &&
+ test_path_is_missing .git/index.lock
'
test_expect_success 'rm removes subdirectories recursively' '