diff options
| author | Taylor Blau <me@ttaylorr.com> | 2022-10-24 14:43:06 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-10-24 13:39:42 -0700 |
| commit | eddad3686080553bb1e6ffa6d9394912f9427823 (patch) | |
| tree | 0bdb6d675986a78734bbef812e72ed0345d6540d /builtin/commit.c | |
| parent | builtin/repack.c: pass "out" to `prepare_pack_objects` (diff) | |
| download | git-eddad3686080553bb1e6ffa6d9394912f9427823.tar.gz git-eddad3686080553bb1e6ffa6d9394912f9427823.zip | |
builtin/repack.c: pass "cruft_expiration" to `write_cruft_pack`
`builtin/repack.c`'s `write_cruft_pack()` is used to generate the cruft
pack when `--cruft` is supplied. It uses a static variable
"cruft_expiration" which is filled in by option parsing.
A future patch will add an `--expire-to` option which allows `git
repack` to write a cruft pack containing the pruned objects out to a
separate repository. In order to implement this functionality, some
callers will have to pass a value for `cruft_expiration` different than
the one filled out by option parsing.
Prepare for this by teaching `write_cruft_pack` to take a
"cruft_expiration" parameter, instead of reading a single static
variable.
The (sole) existing caller of `write_cruft_pack()` will pass the value
for "cruft_expiration" filled in by option parsing, retaining existing
behavior. This means that we can make the variable local to
`cmd_repack()`, and eliminate the static declaration.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions
