Skip to content

Commit d3d3e4c

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent 5cf2741 commit d3d3e4c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sha1_file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,7 @@ static void prepare_packed_git_one(char *objdir, int local)
11941194

11951195
if (has_extension(de->d_name, ".idx") ||
11961196
has_extension(de->d_name, ".pack") ||
1197+
has_extension(de->d_name, ".bitmap") ||
11971198
has_extension(de->d_name, ".keep"))
11981199
string_list_append(&garbage, path);
11991200
else

0 commit comments

Comments
 (0)