diff options
| author | Taylor Blau <me@ttaylorr.com> | 2023-12-14 17:24:07 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-12-14 14:38:08 -0800 |
| commit | 5e29c3f70749f9f2102185e7450c54a3637fdee0 (patch) | |
| tree | 6bedf4a6675204deedc88258902c31dd455bcf94 /parse.c | |
| parent | 83296d20e84e248ea539fe1332fca2139cfcfb8b (diff) | |
pack-objects: parameterize pack-reuse routines over a single pack
The routines pack-objects uses to perform verbatim pack-reuse are:
- write_reused_pack_one()
- write_reused_pack_verbatim()
- write_reused_pack()
, all of which assume that there is exactly one packfile being reused:
the global constant `reuse_packfile`.
Prepare for reusing objects from multiple packs by making reuse packfile
a parameter of each of the above functions in preparation for calling
these functions in a loop with multiple packfiles.
Note that we still have the global "reuse_packfile", but pass it through
each of the above function's parameter lists, eliminating all but one
direct access (the top-level caller in `write_pack_file()`). Even after
this series, we will still have a global, but it will hold the array of
reusable packfiles, and we'll pass them one at a time to these functions
in a loop.
Note also that we will eventually need to pass a `bitmapped_pack`
instead of a `packed_git` in order to hold onto additional information
required for reuse (such as the bit position of the first object
belonging to that pack). But that change will be made in a future commit
so as to minimize the noise below as much as possible.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse.c')
0 files changed, 0 insertions, 0 deletions
