diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-08-20 16:52:04 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-20 15:31:40 -0700 |
commit | 454ea2e4d7036862e8b2f69ef2dea640f8787510 (patch) | |
tree | 5c7d2c447869707b7519770b1a1b992555d63e14 /builtin/gc.c | |
parent | packfile: add all_packs list (diff) | |
download | tgif-454ea2e4d7036862e8b2f69ef2dea640f8787510.tar.xz |
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 'builtin/gc.c')
-rw-r--r-- | builtin/gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index 57069442b0..2b592260e9 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -183,7 +183,7 @@ static struct packed_git *find_base_packs(struct string_list *packs, { struct packed_git *p, *base = NULL; - for (p = get_packed_git(the_repository); p; p = p->next) { + for (p = get_all_packs(the_repository); p; p = p->next) { if (!p->pack_local) continue; if (limit) { @@ -208,7 +208,7 @@ static int too_many_packs(void) if (gc_auto_pack_limit <= 0) return 0; - for (cnt = 0, p = get_packed_git(the_repository); p; p = p->next) { + for (cnt = 0, p = get_all_packs(the_repository); p; p = p->next) { if (!p->pack_local) continue; if (p->pack_keep) |