summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-21 14:00:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-30 20:19:23 (GMT)
commitd3d3e4c490c83daeba61ac1f2be5da2396f7411c (patch)
tree8c6bd0e30887ec4ca99124fdc34d32bad36a62ff /sha1_file.c
parent5cf2741c5a55cfb63076ce679e4b5842595125c2 (diff)
downloadgit-d3d3e4c490c83daeba61ac1f2be5da2396f7411c.zip
git-d3d3e4c490c83daeba61ac1f2be5da2396f7411c.tar.gz
git-d3d3e4c490c83daeba61ac1f2be5da2396f7411c.tar.bz2
count-objects: recognize .bitmap in garbage-checking
Count-objects will report any "garbage" files in the packs directory, including files whose extensions it does not know (case 1), and files whose matching ".pack" file is missing (case 2). Without having learned about ".bitmap" files, the current code reports all such files as garbage (case 1), even if their pack exists. Instead, they should be treated as case 2. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 4714bd8..1294962 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1194,6 +1194,7 @@ static void prepare_packed_git_one(char *objdir, int local)
if (has_extension(de->d_name, ".idx") ||
has_extension(de->d_name, ".pack") ||
+ has_extension(de->d_name, ".bitmap") ||
has_extension(de->d_name, ".keep"))
string_list_append(&garbage, path);
else