diff options
author | Taylor Blau <me@ttaylorr.com> | 2024-05-29 18:55:32 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-30 13:43:51 -0700 |
commit | 364c0ffc5a3b23071eced255b50f1191a0deffd7 (patch) | |
tree | f9b746002030c3bc266d73658aed246c35b8b6ab /merge-blobs.c | |
parent | 33e9218ffbc98618896587d72eab18178f483a17 (diff) |
midx-write.c: extract `should_include_pack()`
The add_pack_to_midx() callback used via for_each_file_in_pack_dir() is
used to add packs with .idx files to the MIDX being written.
Within this function, we have a pair of checks that discards packs
which:
- appear in an existing MIDX, if we successfully read an existing MIDX
from disk
- or, appear in the "to_include" list, if invoking the MIDX write
machinery with the `--stdin-packs` command-line argument.
A future commit will want to call a slight variant of these checks from
the code that reuses all packs from an existing MIDX, as well as the
current location via add_pack_to_midx(). The latter will be modified in
subsequent commits to only reuse packs which appear in the to_include
list, if one was given.
Prepare for that step by extracting these checks as a subroutine that
may be called from both places.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-blobs.c')
0 files changed, 0 insertions, 0 deletions