repack: avoid MIDX'ing cruft pack(s) where possible
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest9 patches 8 repliesIn review
- v59 patches 5 repliesSuperseded
- v49 patches 3 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 9 patches | 10 replies | Superseded | |
| v2 | 8 patches | 18 replies | Superseded | |
| v1 RFC | 8 patches | 0 replies | Superseded |
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | pack-objects: use standard option incompatibility functionsbuiltin/ t/ | +12 | 2 replies | |
| 2/9 | pack-objects: limit scope in 'add_object_entry_from_pack()'builtin/ | +1 | 1 reply | |
| 3/9 | pack-objects: factor out handling '--stdin-packs'builtin/ | +12 | 0 replies | |
| 4/9 | pack-objects: declare 'rev_info' for '--stdin-packs' earlierbuiltin/ | +36 | 1 reply | |
| 5/9 | pack-objects: perform name-hash traversal for unpacked objectsbuiltin/ | +12 | 2 replies | |
| 6/9 | pack-objects: fix typo in 'show_object_pack_hint()'builtin/ | +1 | 0 replies | |
| 7/9 | pack-objects: swap 'show_{object,commit}_pack_hint'builtin/ | +6 | 0 replies | |
| 8/9 | pack-objects: introduce '--stdin-packs=follow'Documentation/ builtin/ t/ | +193 | 2 replies | |
| 9/9 | repack: exclude cruft pack(s) from the MIDX where possibleDocumentation/ builtin/ t/ | +319 | 0 replies |
Reviews trailers per patch
None of the 9 patches has a Reviewed-by or Acked-by.
| Patch | Elijah Newren |
|---|---|
| 1/9 | |
| 2/9 | |
| 3/9 | |
| 4/9 | |
| 5/9 | |
| 6/9 | Noticed-by |
| 7/9 | |
| 8/9 | |
| 9/9 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 0/9] repack: avoid MIDX'ing cruft pack(s) where possible
Here is an additional reroll of my series to create MIDXs that do not include a repository's cruft pack(s).
Nearly everything is identical between this version and the previous (v5), with two exceptions:
- Adjusted where to split a long line in show_object_pack_hint().
- Fixed a test failure with GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL
Thanks for Junio and Peff (respectively) for pointing out each of the above. As usual, a range-diff is attached for convenience.
Thanks in advance for any review :-).
Taylor Blau (9):
pack-objects: use standard option incompatibility functions
pack-objects: limit scope in 'add_object_entry_from_pack()'
pack-objects: factor out handling '--stdin-packs'
pack-objects: declare 'rev_info' for '--stdin-packs' earlier
pack-objects: perform name-hash traversal for unpacked objects
pack-objects: fix typo in 'show_object_pack_hint()'
pack-objects: swap 'show_{object,commit}_pack_hint'
pack-objects: introduce '--stdin-packs=follow'
repack: exclude cruft pack(s) from the MIDX where possible
Documentation/config/repack.adoc | 7 + Documentation/git-pack-objects.adoc | 10 +- builtin/pack-objects.c | 193 ++++++++++++++++++---------- builtin/repack.c | 187 ++++++++++++++++++++++++--- t/t5331-pack-objects-stdin.sh | 122 +++++++++++++++++- t/t7704-repack-cruft.sh | 145 +++++++++++++++++++++ 6 files changed, 573 insertions(+), 91 deletions(-)
Range-diff against v5:
1: 19fab7a35c = 1: 8e7b2dacc7 pack-objects: use standard option incompatibility functions
2: 6f2d3f17a4 = 2: 86fb36d317 pack-objects: limit scope in 'add_object_entry_from_pack()'
3: c06f5b264a = 3: 19e8c789e9 pack-objects: factor out handling '--stdin-packs'
4: 40d7d87cb1 = 4: c9f874eb94 pack-objects: declare 'rev_info' for '--stdin-packs' earlier
5: 5e2599436c = 5: 6b0149a32d pack-objects: perform name-hash traversal for unpacked objects
6: 3a5c3f63d8 = 6: f31dd00a98 pack-objects: fix typo in 'show_object_pack_hint()'
7: 796e8743f8 = 7: 5d15055985 pack-objects: swap 'show_{object,commit}_pack_hint'
8: 8830775beb ! 8: 3699c25337 pack-objects: introduce '--stdin-packs=follow'
@@ builtin/pack-objects.c: static int add_object_entry_from_pack(const struct objec
- return;
+ enum stdin_packs_mode mode = *(enum stdin_packs_mode *)data;
+ if (mode == STDIN_PACKS_MODE_FOLLOW) {
-+ if (object->type == OBJ_BLOB && !has_object(the_repository,
-+ &object->oid, 0))
++ if (object->type == OBJ_BLOB &&
++ !has_object(the_repository, &object->oid, 0))
+ return;
+ add_object_entry(&object->oid, object->type, name, 0);
+ } else {
9: 8f505179cc ! 9: f519777059 repack: exclude cruft pack(s) from the MIDX where possible
@@ builtin/repack.c: int cmd_repack(int argc,
string_list_sort(&names);
+ if (get_local_multi_pack_index(the_repository)) {
-+ uint32_t i;
+ struct multi_pack_index *m =
+ get_local_multi_pack_index(the_repository);
+
-+ ALLOC_ARRAY(midx_pack_names, m->num_packs);
-+ for (i = 0; i < m->num_packs; i++)
-+ midx_pack_names[midx_pack_names_nr++] = xstrdup(m->pack_names[i]);
++ ALLOC_ARRAY(midx_pack_names,
++ m->num_packs + m->num_packs_in_base);
++
++ for (; m; m = m->base_midx)
++ for (uint32_t i = 0; i < m->num_packs; i++)
++ midx_pack_names[midx_pack_names_nr++] =
++ xstrdup(m->pack_names[i]);
+ }
+
close_object_store(the_repository->objects);base-commit: f9aa0eedb37eb94d9d3711ef0d565fd7cb3b6148
Signature · 1 line
2.50.0.61.g1981e40f2d