Skip to content

pseudo-merge: avoid empty and non-closed pseudo-merge commits

Taylor Blau git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8pack-bitmap: initialize `bitmap_writer_init()` with packing_databuiltin/pack-objects.c midx-write.c pack-bitmap-write.c +1 more+7 -43 replies
2/8pack-bitmap: drop redundant args from `bitmap_writer_build_type_index()`builtin/pack-objects.c midx-write.c pack-bitmap-write.c +1 more+8 -130 replies
3/8pack-bitmap: drop redundant args from `bitmap_writer_build()`builtin/pack-objects.c midx-write.c pack-bitmap-write.c +1 more+6 -100 replies
4/8pack-bitmap: drop redundant args from `bitmap_writer_finish()`builtin/pack-objects.c midx-write.c pack-bitmap-write.c +1 more+6 -80 replies
5/8pack-bitmap-write.c: select pseudo-merges even for small bitmapspack-bitmap-write.c+4 -03 replies
6/8t/t5333-pseudo-merge-bitmaps.sh: demonstrate empty pseudo-merge groupst/t5333-pseudo-merge-bitmaps.sh+20 -00 replies
7/8pseudo-merge.c: do not generate empty pseudo-merge commitspseudo-merge.c t/t5333-pseudo-merge-bitmaps.sh+8 -52 replies
8/8pseudo-merge.c: ensure pseudo-merge groups are closedpseudo-merge.c t/t5333-pseudo-merge-bitmaps.sh+38 -01 reply

Reviews trailers per patch

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

PatchJeff King
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8Noticed-by

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

Read the v1 thread

Cover letter [PATCH 0/8] pseudo-merge: avoid empty and non-closed pseudo-merge commits

This series fixes a couple of small issues with pseudo-merge groups, where it is possible to (a) select pseudo-merges that are not closed over reachability with respect to the bitmap's pack or MIDX, and (b) generate empty pseudo-merge commits.

The series is structured as follows:

- The first four commits refactor the pack-bitmap machinery to make the bitmap_writer's packing_data structure available earlier at selection time, and then remove redundant arguments from the rest of the API as a result of that change.

- The fifth commit makes it so we select pseudo-merges even in small repositories, making it easier to write tests in the remainder of the series.

- The next two commits demonstrate and fix a case where we would generate empty pseudo-merge commits (see (b) above).

- The final commit ensures that we do not generate pseudo-merge groups which reach objects not contained in the bitmap's pack or MIDX (see
(a) above).

The bug described in (a) was noticed by Peff, and the remaining seven commits are preparatory, and/or fixing other small issues I noticed along the way while investigating the original impetus for this series.

Thanks in advance for your review!

Taylor Blau (8):
pack-bitmap: initialize bitmap_writer_init() with packing_data
pack-bitmap: drop redundant args from
bitmap_writer_build_type_index()
pack-bitmap: drop redundant args from bitmap_writer_build()
pack-bitmap: drop redundant args from bitmap_writer_finish() pack-bitmap-write.c: select pseudo-merges even for small bitmaps t/t5333-pseudo-merge-bitmaps.sh: demonstrate empty pseudo-merge groups pseudo-merge.c: do not generate empty pseudo-merge commits pseudo-merge.c: ensure pseudo-merge groups are closed

 builtin/pack-objects.c          |  8 ++---
 midx-write.c                    | 10 +++---
 pack-bitmap-write.c             | 37 +++++++++++-----------
 pack-bitmap.h                   | 11 +++----
 pseudo-merge.c                  | 13 +++++---
 t/t5333-pseudo-merge-bitmaps.sh | 56 +++++++++++++++++++++++++++++++++
 6 files changed, 96 insertions(+), 39 deletions(-)

base-commit: 406f326d271e0bacecdb00425422c5fa3f314930

Signature · 1 line
2.46.0.54.gc9a64b1d2a