diff options
author | SZEDER Gábor <szeder@ira.uka.de> | 2013-10-16 02:48:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-16 12:01:53 -0700 |
commit | 056f34bbcdda2f7f85858ed8414afbed99686758 (patch) | |
tree | 97936b62f692503a39094d1e519de45d92264984 /t/t9156-git-svn-fetch-deleted-tag-2.sh | |
parent | do not write null sha1s to on-disk index (diff) | |
download | tgif-056f34bbcdda2f7f85858ed8414afbed99686758.tar.xz |
t3600: fix broken "choking git rm" test
The test 'choking "git rm" should not let it die with cruft' is
supposed to check 'git rm's behavior when interrupted by provoking a
SIGPIPE while 'git rm' is busily deleting files from a specially
crafted index.
This test is silently broken for the following reasons:
- The test crafts a special index by feeding a large number of index
entries with null shas to 'git update-index --index-info'. It was
OK back then when this test was introduced in commit 0693f9ddad
(Make sure lockfiles are unlocked when dying on SIGPIPE,
2008-12-18), but since commit 4337b5856f (do not write null sha1s to
on-disk index, 2012-07-28) null shas are not allowed in the on-disk
index causing 'git update-index' to error out.
- The barfing 'git update-index --index-info' should fail the test,
but it remains unnoticed because of the severely broken && chain:
the test's result depends solely on whether there is a stale lock
file left behind, but after 'git update-index' errors out 'git rm'
won't be executed at all.
To fix this test feed only non-null shas to 'git update-index' and
restore the && chain (partly by adding a missing && and by using the
test_when_finished helper instead of manual cleanup).
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9156-git-svn-fetch-deleted-tag-2.sh')
0 files changed, 0 insertions, 0 deletions