mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
packfile: refactor get_packed_git() to work on packfile store
The `get_packed_git()` function prepares the packfile store and then returns its packfiles. Refactor it to accept a packfile store instead of a repository to clarify its scope. 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
ab8aff4a6b
commit
751808b2a1
@@ -213,7 +213,7 @@ static void find_short_packed_object(struct disambiguate_state *ds)
|
||||
unique_in_midx(m, ds);
|
||||
}
|
||||
|
||||
for (p = get_packed_git(ds->repo); p && !ds->ambiguous;
|
||||
for (p = packfile_store_get_packs(ds->repo->objects->packfiles); p && !ds->ambiguous;
|
||||
p = p->next)
|
||||
unique_in_pack(p, ds);
|
||||
}
|
||||
@@ -806,7 +806,7 @@ static void find_abbrev_len_packed(struct min_abbrev_data *mad)
|
||||
find_abbrev_len_for_midx(m, mad);
|
||||
}
|
||||
|
||||
for (p = get_packed_git(mad->repo); p; p = p->next)
|
||||
for (p = packfile_store_get_packs(mad->repo->objects->packfiles); p; p = p->next)
|
||||
find_abbrev_len_for_pack(p, mad);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user