diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-10 11:46:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-10 11:46:21 -0700 |
commit | 9559de3b660c9bb30b5e0858fb30d4a00ca5e12c (patch) | |
tree | 906d56b88ff0d3c9e0db10dd27a30ef98363c452 /packfile.c | |
parent | Merge branch 'ps/fetch-omit-formatting-under-quiet' (diff) | |
parent | builtin/pack-objects.c: remove duplicate hash lookup (diff) | |
download | tgif-9559de3b660c9bb30b5e0858fb30d4a00ca5e12c.tar.xz |
Merge branch 'tb/add-objects-in-unpacked-packs-simplify'
Code simplification with reduced memory usage.
* tb/add-objects-in-unpacked-packs-simplify:
builtin/pack-objects.c: remove duplicate hash lookup
builtin/pack-objects.c: simplify add_objects_in_unpacked_packs()
object-store.h: teach for_each_packed_object to ignore kept packs
Diffstat (limited to 'packfile.c')
-rw-r--r-- | packfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packfile.c b/packfile.c index 9ef6d98292..4d0d625238 100644 --- a/packfile.c +++ b/packfile.c @@ -2205,6 +2205,12 @@ int for_each_packed_object(each_packed_object_fn cb, void *data, if ((flags & FOR_EACH_OBJECT_PROMISOR_ONLY) && !p->pack_promisor) continue; + if ((flags & FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS) && + p->pack_keep_in_core) + continue; + if ((flags & FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS) && + p->pack_keep) + continue; if (open_pack_index(p)) { pack_errors = 1; continue; |