summaryrefslogtreecommitdiff
path: root/t/t6500-gc.sh
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-05-23 17:27:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-28 18:02:52 (GMT)
commite941c48d49ebe24404515acf258d8003f2374627 (patch)
treea4c1552889d97511831b791517b0d9d3d56d5ddd /t/t6500-gc.sh
parentaa25c82427ae70aebf3b8f970f2afd54e9a2a8c6 (diff)
downloadgit-e941c48d49ebe24404515acf258d8003f2374627.zip
git-e941c48d49ebe24404515acf258d8003f2374627.tar.gz
git-e941c48d49ebe24404515acf258d8003f2374627.tar.bz2
server-info: do not list unlinked packs
Having non-existent packs in objects/info/packs causes dumb HTTP clients to abort. v2: use single loop with ALLOC_GROW as suggested by Jeff King Signed-off-by: Eric Wong <e@80x24.org> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6500-gc.sh')
-rwxr-xr-xt/t6500-gc.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index 515c673..c0f04dc 100755
--- a/t/t6500-gc.sh
+++ b/t/t6500-gc.sh
@@ -71,6 +71,8 @@ test_expect_success 'gc --keep-largest-pack' '
git gc --keep-largest-pack &&
( cd .git/objects/pack && ls *.pack ) >pack-list &&
test_line_count = 2 pack-list &&
+ awk "/^P /{print \$2}" <.git/objects/info/packs >pack-info &&
+ test_line_count = 2 pack-info &&
test_path_is_file $BASE_PACK &&
git fsck
)