Skip to content

Commit 0c49455

Browse files
pks-tgitster
authored andcommitted
packfile: rename packfile_store_get_all_packs()
In a preceding commit we have removed `packfile_store_get_packs()`. With this function removed it's somewhat useless to still have the "all" infix in `packfile_store_get_all_packs()`. Rename the latter to drop that infix. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 55ee631 commit 0c49455

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

builtin/fast-import.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ static int store_object(
976976
if (e->idx.offset) {
977977
duplicate_count_by_type[type]++;
978978
return 1;
979-
} else if (find_oid_pack(&oid, packfile_store_get_all_packs(packs))) {
979+
} else if (find_oid_pack(&oid, packfile_store_get_packs(packs))) {
980980
e->type = type;
981981
e->pack_id = MAX_PACK_ID;
982982
e->idx.offset = 1; /* just not zero! */
@@ -1177,7 +1177,7 @@ static void stream_blob(uintmax_t len, struct object_id *oidout, uintmax_t mark)
11771177
duplicate_count_by_type[OBJ_BLOB]++;
11781178
truncate_pack(&checkpoint);
11791179

1180-
} else if (find_oid_pack(&oid, packfile_store_get_all_packs(packs))) {
1180+
} else if (find_oid_pack(&oid, packfile_store_get_packs(packs))) {
11811181
e->type = OBJ_BLOB;
11821182
e->pack_id = MAX_PACK_ID;
11831183
e->idx.offset = 1; /* just not zero! */

builtin/pack-objects.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4398,7 +4398,7 @@ static int has_sha1_pack_kept_or_nonlocal(const struct object_id *oid)
43984398
struct packed_git *p;
43994399

44004400
p = (last_found != (void *)1) ? last_found :
4401-
packfile_store_get_all_packs(packs);
4401+
packfile_store_get_packs(packs);
44024402

44034403
while (p) {
44044404
if ((!p->pack_local || p->pack_keep ||
@@ -4408,7 +4408,7 @@ static int has_sha1_pack_kept_or_nonlocal(const struct object_id *oid)
44084408
return 1;
44094409
}
44104410
if (p == last_found)
4411-
p = packfile_store_get_all_packs(packs);
4411+
p = packfile_store_get_packs(packs);
44124412
else
44134413
p = p->next;
44144414
if (p == last_found)

packfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ void packfile_store_reprepare(struct packfile_store *store)
10271027
packfile_store_prepare(store);
10281028
}
10291029

1030-
struct packed_git *packfile_store_get_all_packs(struct packfile_store *store)
1030+
struct packed_git *packfile_store_get_packs(struct packfile_store *store)
10311031
{
10321032
packfile_store_prepare(store);
10331033

packfile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ void packfile_store_add_pack(struct packfile_store *store,
140140
* Load and iterate through all packs of the given packfile store.
141141
*/
142142
#define packfile_store_for_each_pack(store, p) \
143-
for (p = packfile_store_get_all_packs(store); p; p = p->next)
143+
for (p = packfile_store_get_packs(store); p; p = p->next)
144144

145145
/*
146146
* Get all packs managed by the given store, including packfiles that are
147147
* referenced by multi-pack indices.
148148
*/
149-
struct packed_git *packfile_store_get_all_packs(struct packfile_store *store);
149+
struct packed_git *packfile_store_get_packs(struct packfile_store *store);
150150

151151
/*
152152
* Get all packs in most-recently-used order.

0 commit comments

Comments
 (0)