Skip to content

Commit ecad863

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 <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 86d8c62 commit ecad863

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
@@ -4394,7 +4394,7 @@ static int has_sha1_pack_kept_or_nonlocal(const struct object_id *oid)
43944394
struct packed_git *p;
43954395

43964396
p = (last_found != (void *)1) ? last_found :
4397-
packfile_store_get_all_packs(packs);
4397+
packfile_store_get_packs(packs);
43984398

43994399
while (p) {
44004400
if ((!p->pack_local || p->pack_keep ||
@@ -4404,7 +4404,7 @@ static int has_sha1_pack_kept_or_nonlocal(const struct object_id *oid)
44044404
return 1;
44054405
}
44064406
if (p == last_found)
4407-
p = packfile_store_get_all_packs(packs);
4407+
p = packfile_store_get_packs(packs);
44084408
else
44094409
p = p->next;
44104410
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
@@ -142,13 +142,13 @@ void packfile_store_add_pack(struct packfile_store *store,
142142
* repository.
143143
*/
144144
#define repo_for_each_pack(repo, p) \
145-
for (p = packfile_store_get_all_packs(repo->objects->packfiles); p; p = p->next)
145+
for (p = packfile_store_get_packs(repo->objects->packfiles); p; p = p->next)
146146

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

153153
/*
154154
* Get all packs in most-recently-used order.

0 commit comments

Comments
 (0)