mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
treewide: use get_all_packs
There are many places in the codebase that want to iterate over all packfiles known to Git. The purposes are wide-ranging, and those that can take advantage of the multi-pack-index already do. So, use get_all_packs() instead of get_packed_git() to be sure we are iterating over all packfiles. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0bff5269d3
commit
454ea2e4d7
@@ -199,7 +199,7 @@ static void init_pack_info(const char *infofile, int force)
|
||||
objdir = get_object_directory();
|
||||
objdirlen = strlen(objdir);
|
||||
|
||||
for (p = get_packed_git(the_repository); p; p = p->next) {
|
||||
for (p = get_all_packs(the_repository); p; p = p->next) {
|
||||
/* we ignore things on alternate path since they are
|
||||
* not available to the pullers in general.
|
||||
*/
|
||||
@@ -209,7 +209,7 @@ static void init_pack_info(const char *infofile, int force)
|
||||
}
|
||||
num_pack = i;
|
||||
info = xcalloc(num_pack, sizeof(struct pack_info *));
|
||||
for (i = 0, p = get_packed_git(the_repository); p; p = p->next) {
|
||||
for (i = 0, p = get_all_packs(the_repository); p; p = p->next) {
|
||||
if (!p->pack_local)
|
||||
continue;
|
||||
info[i] = xcalloc(1, sizeof(struct pack_info));
|
||||
|
||||
Reference in New Issue
Block a user