diff options
| author | Christian Couder <christian.couder@gmail.com> | 2026-08-11 10:33:08 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-08-11 07:33:17 -0700 |
| commit | 63112e71a3f62cf49a7ee8f13d1250d1f02970ac (patch) | |
| tree | 46da6787486ce379fd92579e391489724f04a4b6 /contrib/persistent-https | |
| parent | a895a37c1bccbfc19892df14ea83c56ea4f50e87 (diff) | |
fast-import: factor out option_*() functions
In a following commit we are going to use the parse-options API to
start parsing options. Some options will have to be parsed using
OPT_CALLBACK as they process their arguments in special ways.
When the processing code is already factored out in an option_*()
function, like for `--date-format`, we can reuse that function.
Unfortunately for other options the processing code has not been
factored out yet.
Let's do it now and factor out the code that handles the following
options:
- `--max-pack-size=<n>`
- `--big-file-threshold=<n>`
- `--signed-commits=<mode>`
- `--signed-tags=<mode>`
- `--quiet`
into new option_*() functions:
- option_max_pack_size()
- option_big_file_threshold()
- option_signed_commits()
- option_signed_tags()
- option_quiet()
so that we can reuse these functions in following commits when the
parse-option API will be used.
Note that there are some behavior changes as we now die() with a
proper error message when git_parse_ulong() cannot parse the argument
from --max-pack-size or from --big-file-threshold. Previously we would
end up calling die("unknown option") instead.
Signed-off-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
