mirror of
https://github.com/git/git.git
synced 2026-08-09 01:21:47 +00:00
pack-bitmap: drop _1 suffix from functions that open bitmaps
In the preceding commit we've refactored how we open bitmaps. As part of the refactoring we have consolidated `open_pack_bitmap()` as well as `open_midx_bitmap()` into `open_bitmap_for_source()`. Consequently, we only have their `open_pack_bitmap_1()` and `open_midx_bitmap_1()` variants left over, where the `_1` suffix doesn't really make much sense anymore. Drop the suffix. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
eaa9807c97
commit
db95bfc121
@@ -460,8 +460,8 @@ char *pack_bitmap_filename(struct packed_git *p)
|
||||
return xstrfmt("%.*s.bitmap", (int)len, p->pack_name);
|
||||
}
|
||||
|
||||
static int open_midx_bitmap_1(struct bitmap_index *bitmap_git,
|
||||
struct multi_pack_index *midx)
|
||||
static int open_midx_bitmap(struct bitmap_index *bitmap_git,
|
||||
struct multi_pack_index *midx)
|
||||
{
|
||||
struct stat st;
|
||||
char *bitmap_name = midx_bitmap_filename(midx);
|
||||
@@ -539,7 +539,7 @@ cleanup:
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int open_pack_bitmap_1(struct bitmap_index *bitmap_git, struct packed_git *packfile)
|
||||
static int open_pack_bitmap(struct bitmap_index *bitmap_git, struct packed_git *packfile)
|
||||
{
|
||||
int fd;
|
||||
struct stat st;
|
||||
@@ -603,7 +603,7 @@ static int load_reverse_index(struct repository *r, struct bitmap_index *bitmap_
|
||||
|
||||
/*
|
||||
* The multi-pack-index's .rev file is already loaded via
|
||||
* open_pack_bitmap_1().
|
||||
* open_pack_bitmap().
|
||||
*
|
||||
* But we still need to open the individual pack .rev files,
|
||||
* since we will need to make use of them in pack-objects.
|
||||
@@ -687,7 +687,7 @@ static int open_bitmap_for_source(struct odb_source_packed *source,
|
||||
struct packfile_list_entry *e;
|
||||
bool found = false;
|
||||
|
||||
if (midx && !open_midx_bitmap_1(bitmap_git, midx))
|
||||
if (midx && !open_midx_bitmap(bitmap_git, midx))
|
||||
found = true;
|
||||
|
||||
for (e = packfile_store_get_packs(source); e; e = e->next) {
|
||||
@@ -698,7 +698,7 @@ static int open_bitmap_for_source(struct odb_source_packed *source,
|
||||
if (found && !trace2_is_enabled())
|
||||
break;
|
||||
|
||||
if (!open_pack_bitmap_1(bitmap_git, e->pack))
|
||||
if (!open_pack_bitmap(bitmap_git, e->pack))
|
||||
found = true;
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ struct bitmap_index *prepare_midx_bitmap_git(struct multi_pack_index *midx)
|
||||
{
|
||||
struct bitmap_index *bitmap_git = xcalloc(1, sizeof(*bitmap_git));
|
||||
|
||||
if (!open_midx_bitmap_1(bitmap_git, midx))
|
||||
if (!open_midx_bitmap(bitmap_git, midx))
|
||||
return bitmap_git;
|
||||
|
||||
free_bitmap_index(bitmap_git);
|
||||
|
||||
Reference in New Issue
Block a user