diff options
author | Taylor Blau <me@ttaylorr.com> | 2024-04-01 23:16:41 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-01 23:18:17 +0200 |
commit | 440e470edb183d020d2982d90d27113f05189727 (patch) | |
tree | b549047e8b63117e6f81b81d1e8be25d600f8a56 /strmap.h | |
parent | midx-write.c: factor out common want_included_pack() routine (diff) | |
download | git-440e470edb183d020d2982d90d27113f05189727.tar.xz git-440e470edb183d020d2982d90d27113f05189727.zip |
midx-write.c: check count of packs to repack after grouping
In both fill_included_packs_all() and fill_included_packs_batch(), we
accumulate a list of packs whose contents we want to repack together,
and then use that information to feed a list of objects as input to
pack-objects.
In both cases, the `fill_included_packs_` functions keep track of how
many packs they want to repack together, and only execute pack-objects
if there are at least two packs that need repacking.
Having both of these functions keep track of this information themselves
is not strictly necessary, since they also log which packs to repack via
the `include_pack` array, so we can simply count the non-zero entries in
that array after either function is done executing, reducing the overall
amount of code necessary.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strmap.h')
0 files changed, 0 insertions, 0 deletions