[PATCH v2 0/5] packfile: use oidset for bad objects
- From
René Scharfe <l.s.r@web.de>
- Date
- Sep 11, 2021, 20:31 UTC
- Message-ID
- <e50c1465-59de-7fe1-de01-800404c7640e@web.de>
- In-Reply-To
- <4a702bfe-afd0-669a-c893-0262289c24b8@web.de>
Replace the custom hash array for remembering corrupt pack entries with an oidset. This shortens and simplifies the code.
Changes since v1: - inline oidset_size() - inline nth_midxed_pack_entry() early - use oidset_size() to avoid a function call if no bad objects exist
oidset: make oidset_size() an inline function midx: inline nth_midxed_pack_entry() packfile: convert mark_bad_packed_object() to object_id packfile: convert has_packed_and_bad() to object_id packfile: use oidset for bad objects
midx.c | 37 +++++++++++-------------------------- object-file.c | 4 ++-- object-store.h | 4 ++-- oidset.c | 5 ----- oidset.h | 5 ++++- packfile.c | 38 +++++++++++--------------------------- packfile.h | 4 ++-- 7 files changed, 32 insertions(+), 65 deletions(-)
-- 2.33.0