Skip to content

Commit 504c194

Browse files
committed
Merge branch 'sg/t3600-nul-sha1-fix'
* sg/t3600-nul-sha1-fix: t3600: fix broken "choking git rm" test
2 parents 0bfc7c1 + 056f34b commit 504c194

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

t/t3600-rm.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,18 +240,15 @@ test_expect_success 'refresh index before checking if it is up-to-date' '
240240

241241
test_expect_success 'choking "git rm" should not let it die with cruft' '
242242
git reset -q --hard &&
243+
test_when_finished "rm -f .git/index.lock && git reset -q --hard" &&
243244
i=0 &&
244245
while test $i -lt 12000
245246
do
246-
echo "100644 $_z40 0 some-file-$i"
247+
echo "100644 1234567890123456789012345678901234567890 0 some-file-$i"
247248
i=$(( $i + 1 ))
248249
done | git update-index --index-info &&
249-
git rm -n "some-file-*" | :;
250-
test -f .git/index.lock
251-
status=$?
252-
rm -f .git/index.lock
253-
git reset -q --hard
254-
test "$status" != 0
250+
git rm -n "some-file-*" | : &&
251+
test_path_is_missing .git/index.lock
255252
'
256253

257254
test_expect_success 'rm removes subdirectories recursively' '

0 commit comments

Comments
 (0)