From: Teng Long <dyroneteng@xxxxxxxxx> Everytime when calling "open_pack_bitmap_1()", we will firstly call "open_pack_index(packfile)" to check the index, then further check again in "is_pack_valid()" before mmap the bitmap file. So, let's remove the first check here. The relate discussion: https://public-inbox.org/git/Y2IiSU1L+bJPUioV@xxxxxxxxxxxxxxxxxxxxxxx/#t Signed-off-by: Teng Long <dyroneteng@xxxxxxxxx> --- pack-bitmap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/pack-bitmap.c b/pack-bitmap.c index 9443b7adca..503c95f0b8 100644 --- a/pack-bitmap.c +++ b/pack-bitmap.c @@ -412,9 +412,6 @@ static int open_pack_bitmap_1(struct bitmap_index *bitmap_git, struct packed_git struct stat st; char *bitmap_name; - if (open_pack_index(packfile)) - return -1; - bitmap_name = pack_bitmap_filename(packfile); fd = git_open(bitmap_name); -- 2.38.1.383.g35840fde1dd