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 <dyroneteng@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9975975d7f
commit
349c26ff29
@ -314,10 +314,10 @@ static int open_midx_bitmap_1(struct bitmap_index *bitmap_git,
|
|||||||
struct multi_pack_index *midx)
|
struct multi_pack_index *midx)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *idx_name = midx_bitmap_filename(midx);
|
char *bitmap_name = midx_bitmap_filename(midx);
|
||||||
int fd = git_open(idx_name);
|
int fd = git_open(bitmap_name);
|
||||||
|
|
||||||
free(idx_name);
|
free(bitmap_name);
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -369,14 +369,14 @@ static int open_pack_bitmap_1(struct bitmap_index *bitmap_git, struct packed_git
|
|||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *idx_name;
|
char *bitmap_name;
|
||||||
|
|
||||||
if (open_pack_index(packfile))
|
if (open_pack_index(packfile))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
idx_name = pack_bitmap_filename(packfile);
|
bitmap_name = pack_bitmap_filename(packfile);
|
||||||
fd = git_open(idx_name);
|
fd = git_open(bitmap_name);
|
||||||
free(idx_name);
|
free(bitmap_name);
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user