Skip to content

removing nth_packed_object_sha1()

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10nth_packed_object_oid(): use customary integer returnbuiltin/pack-objects.c midx.c pack-bitmap.c +3 more+22 -241 reply
2/10pack-objects: read delta base oid into object_id structbuiltin/pack-objects.c+18 -171 reply
3/10pack-objects: convert oe_set_delta_ext() to use object_idbuiltin/pack-objects.c pack-objects.c pack-objects.h+4 -40 replies
4/10pack-objects: use object_id struct in pack-reuse codebuiltin/pack-objects.c+5 -40 replies
5/10pack-bitmap: use object_id when loading on-disk bitmapspack-bitmap.c+6 -60 replies
6/10pack-check: convert "internal error" die to a BUG()pack-check.c+2 -10 replies
7/10pack-check: push oid lookup into looppack-check.c+10 -130 replies
8/10packed_object_info(): use object_id for returning delta basebuiltin/cat-file.c object-store.h packfile.c +2 more+11 -110 replies
9/10packed_object_info(): use object_id internally for delta basepackfile.c+15 -170 replies
10/10packfile: drop nth_packed_object_sha1()packfile.c packfile.h+10 -250 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/10] removing nth_packed_object_sha1()

This series gets rid of nth_packed_object_sha1(), converting its remaining callers to nth_packed_object_oid(). The latter provides better type-safety in general, and it also allowed me to clean up some tricky bits of the pack-verification code (patch 7 below).

This was inspired by brian's work in:

https://lore.kernel.org/git/[email protected]/

but I decide not to base it on that series. It's semantically independent, and with the exception of one line, textually independent (patch 4 here touches a different parameter in the same call as the patch linked above). So I think it's easier to handle them independently and just resolve the trivial conflict.

[01/10]: nth_packed_object_oid(): use customary integer return [02/10]: pack-objects: read delta base oid into object_id struct [03/10]: pack-objects: convert oe_set_delta_ext() to use object_id [04/10]: pack-objects: use object_id struct in pack-reuse code [05/10]: pack-bitmap: use object_id when loading on-disk bitmaps [06/10]: pack-check: convert "internal error" die to a BUG() [07/10]: pack-check: push oid lookup into loop
[08/10]: packed_object_info(): use object_id for returning delta base [09/10]: packed_object_info(): use object_id internally for delta base [10/10]: packfile: drop nth_packed_object_sha1()

 builtin/cat-file.c     |  2 +-
 builtin/pack-objects.c | 48 +++++++++++++++--------------
 midx.c                 |  2 +-
 object-store.h         |  2 +-
 pack-bitmap.c          | 16 +++++-----
 pack-check.c           | 22 ++++++--------
 pack-objects.c         |  4 +--
 pack-objects.h         |  2 +-
 packfile.c             | 69 ++++++++++++++++++------------------------
 packfile.h             | 15 +++------
 ref-filter.c           |  4 +--
 sha1-file.c            |  8 ++---
 sha1-name.c            | 13 ++++----
 13 files changed, 94 insertions(+), 113 deletions(-)

-Peff