diff options
| author | Taylor Blau <me@ttaylorr.com> | 2023-10-02 20:44:29 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-10-05 13:18:54 -0700 |
| commit | b5b1f4c0ecf20c069d0301732edfdbfec167aa0c (patch) | |
| tree | 20c0d71834927e82d135f4351acc47be7c81f95f /commit.c | |
| parent | t7700: split cruft-related tests to t7704 (diff) | |
| download | git-b5b1f4c0ecf20c069d0301732edfdbfec167aa0c.tar.gz git-b5b1f4c0ecf20c069d0301732edfdbfec167aa0c.zip | |
builtin/repack.c: parse `--max-pack-size` with OPT_MAGNITUDE
The repack builtin takes a `--max-pack-size` command-line argument which
it uses to feed into any of the pack-objects children that it may spawn
when generating a new pack.
This option is parsed with OPT_STRING, meaning that we'll accept
anything as input, punting on more fine-grained validation until we get
down into pack-objects.
This is fine, but it's wasteful to spend an entire sub-process just to
figure out that one of its option is bogus. Instead, parse the value of
`--max-pack-size` with OPT_MAGNITUDE in 'git repack', and then pass the
known-good result down to pack-objects.
Suggested-by: Junio C Hamano <gitster@pobox.com>
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
