Skip to content

pack-objects: brown-paper-bag fixes for multi-pack reuse

Taylor Blau git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5t/t5332-multi-pack-reuse.sh: verify pack generation with --strictt/t5332-multi-pack-reuse.sh+12 -80 replies
2/5pack-bitmap: tag bitmapped packs with their corresponding MIDXmidx.c pack-bitmap.c pack-bitmap.h+3 -04 replies
3/5builtin/pack-objects.c: translate bit positions during pack-reusebuiltin/pack-objects.c t/t5332-multi-pack-reuse.sh+63 -121 reply
4/5pack-bitmap.c: avoid repeated `pack_pos_to_offset()` during reusepack-bitmap.c+7 -42 replies
5/5builtin/pack-objects.c: do not open-code `MAX_PACK_OBJECT_HEADER`builtin/pack-objects.c+1 -10 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/5] pack-objects: brown-paper-bag fixes for multi-pack reuse

This series fixes a couple of issues (some cosmetic, others less so) in multi-pack reuse noticed when rolling this out over a few real-world, internal repositories on GitHub's servers.

The patches are laid out as follows:

- The first three patches demonstrate, prepare for, and fix a significant bug with multi-pack reuse which results in all sorts of strange behavior (explained in detail in the third commit of this series).

- The fourth patch is a minor (mostly cosmetic) performance optimization that avoids duplicate calls to pack_pos_to_offset() when performing pack-reuse with a MIDX bitmap.

- The final patch is a cosmetic fix to avoid using the value of a constant instead of the name constant itself.

Thanks in advance for your review!

Taylor Blau (5):
t/t5332-multi-pack-reuse.sh: verify pack generation with --strict
pack-bitmap: tag bitmapped packs with their corresponding MIDX builtin/pack-objects.c: translate bit positions during pack-reuse pack-bitmap.c: avoid repeated pack_pos_to_offset() during reuse builtin/pack-objects.c: do not open-code MAX_PACK_OBJECT_HEADER

 builtin/pack-objects.c      | 46 +++++++++++++++++++++++++++++--------
 midx.c                      |  1 +
 pack-bitmap.c               | 12 ++++++----
 pack-bitmap.h               |  1 +
 t/t5332-multi-pack-reuse.sh | 35 ++++++++++++++++++++++++----
 5 files changed, 78 insertions(+), 17 deletions(-)

base-commit: 159f2d50e75c17382c9f4eb7cbda671a6fa612d1

Signature · 1 line
2.46.0.426.g82754d92509