summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-09-13 15:17:35 -0400
committerJunio C Hamano <gitster@pobox.com>2023-09-13 12:32:47 -0700
commite2b43831a5e4b482be19746d2257a309b51ba5fe (patch)
tree588bd4ea66563a036763cfaacb5d7dc0f03d6f63 /commit.c
parent1fc548b2d6a3596f3e1c1f8b1930d8dbd1e30bf3 (diff)
builtin/repack.c: extract structure to store existing packs
The repack machinery needs to keep track of which packfiles were present in the repository at the beginning of a repack, segmented by whether or not each pack is marked as kept. The names of these packs are stored in two `string_list`s, corresponding to kept- and non-kept packs, respectively. As a consequence, many functions within the repack code need to take both `string_list`s as arguments, leading to code like this: ret = write_cruft_pack(&cruft_po_args, packtmp, pack_prefix, cruft_expiration, &names, &existing_nonkept_packs, /* <- */ &existing_kept_packs); /* <- */ Wrap up this pair of `string_list`s into a single structure that stores both. This saves us from having to pass both string lists separately, and prepares for adding additional fields to this structure. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions