[PATCH v3 18/21] count-objects: recognize .bitmap in garbage-checking
- From
Jeff King <peff@peff.net>
- Date
- Nov 14, 2013, 12:46 UTC
- Message-ID
- <20131114124618.GR10757@sigill.intra.peff.net>
- In-Reply-To
- <20131114124157.GA23784@sigill.intra.peff.net>
From: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
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> --- sha1_file.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sha1_file.c b/sha1_file.c index 5557bd9..d810b58 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
-- 1.8.5.rc0.443.g2df7f3f