aboutsummaryrefslogtreecommitdiff
path: root/t/t2105-update-index-gitfile.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-09-06 20:47:07 -0500
committerJunio C Hamano <gitster@pobox.com>2010-09-09 15:58:32 -0700
commitdbedf8bf42f63847b096aeb7d6b96cf3a2233b7a (patch)
tree2e707207416f96b6134eb1f9701dffe4db0390bb /t/t2105-update-index-gitfile.sh
parent18a826924284339e2b637ab747f196235bee1939 (diff)
downloadgit-dbedf8bf42f63847b096aeb7d6b96cf3a2233b7a.tar.gz
git-dbedf8bf42f63847b096aeb7d6b96cf3a2233b7a.tar.xz
t1450 (fsck): remove dangling objects
The fsck test is generally careful to remove the corrupt objects it inserts, but dangling objects are left behind due to some typos and omissions. It is better to clean up more completely, to simplify the addition of later tests. So: - guard setup and cleanup with test_expect_success to catch typos and errors; - check both stdout and stderr when checking for empty fsck output; - use test_cmp empty file in place of test $(wc -l <file) = 0, for better debugging output when running tests with -v; - add a remove_object () helper and use it to replace broken object removal code that forgot about the fanout in .git/objects; - disable gc.auto, to avoid tripping up object removal if the number of objects ever reaches that threshold. - use test_when_finished to ensure cleanup tasks are run and succeed when tests fail; - add a new final test that no breakage or dangling objects was left behind. While at it, add a brief description to test_description of the history that is expected to persist between tests. Part of a campaign to clean up subshell usage in tests. Cc: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2105-update-index-gitfile.sh')
0 files changed, 0 insertions, 0 deletions