summaryrefslogtreecommitdiff
path: root/packfile.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-08-20 16:52:04 +0000
committerJunio C Hamano <gitster@pobox.com>2018-08-20 15:31:40 -0700
commit454ea2e4d7036862e8b2f69ef2dea640f8787510 (patch)
tree5c7d2c447869707b7519770b1a1b992555d63e14 /packfile.c
parent0bff5269d3ed7124259bb3a5b33ddf2c4080b7e7 (diff)
downloadgit-454ea2e4d7036862e8b2f69ef2dea640f8787510.tar.gz
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>
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/packfile.c b/packfile.c
index adcf2e12a0..cbef7033c3 100644
--- a/packfile.c
+++ b/packfile.c
@@ -2036,7 +2036,7 @@ int for_each_packed_object(each_packed_object_fn cb, void *data,
int pack_errors = 0;
prepare_packed_git(the_repository);
- for (p = the_repository->objects->packed_git; p; p = p->next) {
+ for (p = get_all_packs(the_repository); p; p = p->next) {
if ((flags & FOR_EACH_OBJECT_LOCAL_ONLY) && !p->pack_local)
continue;
if ((flags & FOR_EACH_OBJECT_PROMISOR_ONLY) &&