mbox series

[0/3] packfile: use oidset for bad objects

Message ID 4a702bfe-afd0-669a-c893-0262289c24b8@web.de (mailing list archive)
Headers show
Series packfile: use oidset for bad objects | expand

Message

René Scharfe Sept. 11, 2021, 7:50 a.m. UTC
Replace the custom hash array for remembering corrupt pack entries with
an oidset.  This shortens and simplifies the code.

  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         | 13 ++++---------
 object-file.c  |  4 ++--
 object-store.h |  4 ++--
 packfile.c     | 37 ++++++++++---------------------------
 packfile.h     |  4 ++--
 5 files changed, 20 insertions(+), 42 deletions(-)

--
2.33.0

Comments

Jeff King Sept. 11, 2021, 2:27 p.m. UTC | #1
On Sat, Sep 11, 2021 at 09:50:36AM +0200, René Scharfe wrote:

> Replace the custom hash array for remembering corrupt pack entries with
> an oidset.  This shortens and simplifies the code.

Thanks, these were a pleasure to read.

I noticed one possible small performance change in the third patch. It
should be easy to remedy if we want (but I could also believe that it
doesn't matter either way, if you care to argue that :) ).

-Peff