Skip to content

Commit 349c26f

Browse files
dyronegitster
authored andcommitted
pack-bitmap.c: rename "idx_name" to "bitmap_name"
In "open_pack_bitmap_1()" and "open_midx_bitmap_1()" we use a var named "idx_name" to represent the bitmap filename which is computed by "midx_bitmap_filename()" or "pack_bitmap_filename()" before we open it. There may bring some confusion in this "idx_name" naming, which might lead us to think of ".idx "or" multi-pack-index" files, although bitmap is essentially can be understood as a kind of index, let's define this name a little more accurate here. Signed-off-by: Teng Long <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9975975 commit 349c26f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pack-bitmap.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ static int open_midx_bitmap_1(struct bitmap_index *bitmap_git,
314314
struct multi_pack_index *midx)
315315
{
316316
struct stat st;
317-
char *idx_name = midx_bitmap_filename(midx);
318-
int fd = git_open(idx_name);
317+
char *bitmap_name = midx_bitmap_filename(midx);
318+
int fd = git_open(bitmap_name);
319319

320-
free(idx_name);
320+
free(bitmap_name);
321321

322322
if (fd < 0)
323323
return -1;
@@ -369,14 +369,14 @@ static int open_pack_bitmap_1(struct bitmap_index *bitmap_git, struct packed_git
369369
{
370370
int fd;
371371
struct stat st;
372-
char *idx_name;
372+
char *bitmap_name;
373373

374374
if (open_pack_index(packfile))
375375
return -1;
376376

377-
idx_name = pack_bitmap_filename(packfile);
378-
fd = git_open(idx_name);
379-
free(idx_name);
377+
bitmap_name = pack_bitmap_filename(packfile);
378+
fd = git_open(bitmap_name);
379+
free(bitmap_name);
380380

381381
if (fd < 0)
382382
return -1;

0 commit comments

Comments
 (0)