summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2025-10-15 18:28:59 -0400
committerJunio C Hamano <gitster@pobox.com>2025-10-16 10:08:55 -0700
commit2fee63a71ae8113fd91d8e5924ae4a5619ad0cd3 (patch)
tree043efeb9fa7032bf1179080251bfb2bf976a6f8f /tree-diff.c
parentc3690c97d7b08d9876fcaf0a572b4956bc9b4c33 (diff)
repack: keep track of MIDX pack names using existing_packs
Instead of storing the list of MIDX pack names separately, let's inline it into the existing_packs struct, further reducing the number of parameters we have to pass around. This amounts to adding a new string_list to the existing_packs struct, and populating it via `existing_packs_collect()`. This is fairly straightforward to do, since we are already looping over all packs, all we need to do is: if (p->multi_pack_index) string_list_append(&existing->midx_packs, pack_basename(p)); Note, however, that this check *must* come before other conditions where we discard and do not keep track of a pack, including the condition "if (!p->pack_local)" immediately below. This is because the existing routine which collects MIDX pack names does so blindly, and does not discard, for example, non-local packs. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-diff.c')
0 files changed, 0 insertions, 0 deletions