Skip to content

packfile: use oidset for bad objects

René Scharfe git 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesIn review
  2. v13 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- inline oidset_size()
- inline nth_midxed_pack_entry() early
- use oidset_size() to avoid a function call if no bad objects exist

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5oidset: make oidset_size() an inline functionoidset.c oidset.h+4 -60 replies
2/5midx: inline nth_midxed_pack_entry()midx.c+9 -200 replies
3/5packfile: convert mark_bad_packed_object() to object_idobject-file.c packfile.c packfile.h+8 -80 replies
4/5packfile: convert has_packed_and_bad() to object_idobject-file.c packfile.c packfile.h+4 -40 replies
5/5packfile: use oidset for bad objectsmidx.c object-store.h packfile.c+11 -310 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchJeff King
1/5
2/5
3/5
4/5
5/5Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] packfile: use oidset for bad objects

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