diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-30 08:00:19 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-30 08:00:19 -0700 |
| commit | 55547380384c77071b2fc8ff4cc570434a4793d1 (patch) | |
| tree | 600b21a00ff2b29022d64e9c435c219500a59e1f /object-name.c | |
| parent | c43d4cf762df8e0c068099cf74637ce029f4babb (diff) | |
| parent | ecad863c127cd167647e5929d94627c799587134 (diff) | |
| download | git-55547380384c77071b2fc8ff4cc570434a4793d1.tar.gz | |
Merge branch 'ps/remove-packfile-store-get-packs'
Two slightly different ways to get at "all the packfiles" in API
has been cleaned up.
* ps/remove-packfile-store-get-packs:
packfile: rename `packfile_store_get_all_packs()`
packfile: introduce macro to iterate through packs
packfile: drop `packfile_store_get_packs()`
builtin/grep: simplify how we preload packs
builtin/gc: convert to use `packfile_store_get_all_packs()`
object-name: convert to use `packfile_store_get_all_packs()`
Diffstat (limited to 'object-name.c')
| -rw-r--r-- | object-name.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/object-name.c b/object-name.c index f6902e140d..766c757042 100644 --- a/object-name.c +++ b/object-name.c @@ -213,9 +213,11 @@ static void find_short_packed_object(struct disambiguate_state *ds) unique_in_midx(m, ds); } - for (p = packfile_store_get_packs(ds->repo->objects->packfiles); p && !ds->ambiguous; - p = p->next) + repo_for_each_pack(ds->repo, p) { + if (ds->ambiguous) + break; unique_in_pack(p, ds); + } } static int finish_object_disambiguation(struct disambiguate_state *ds, @@ -805,7 +807,7 @@ static void find_abbrev_len_packed(struct min_abbrev_data *mad) find_abbrev_len_for_midx(m, mad); } - for (p = packfile_store_get_packs(mad->repo->objects->packfiles); p; p = p->next) + repo_for_each_pack(mad->repo, p) find_abbrev_len_for_pack(p, mad); } |
