Merge branch 'jk/unused-parameter-fixes'
Various functions have been audited for "-Wunused-parameter" warnings and bugs in them got fixed. * jk/unused-parameter-fixes: midx: double-check large object write loop assert NOARG/NONEG behavior of parse-options callbacks parse-options: drop OPT_DATE() apply: return -1 from option callback instead of calling exit(1) cat-file: report an error on multiple --batch options tag: mark "--message" option with NONEG show-branch: mark --reflog option as NONEG format-patch: mark "--no-numbered" option with NONEG status: mark --find-renames option with NONEG cat-file: mark batch options with NONEG pack-objects: mark index-version option as NONEG ls-files: mark exclude options as NONEG am: handle --no-patch-format option apply: mark include/exclude options as NONEG
This commit is contained in:
@ -3187,6 +3187,9 @@ static int option_parse_index_version(const struct option *opt,
|
||||
{
|
||||
char *c;
|
||||
const char *val = arg;
|
||||
|
||||
BUG_ON_OPT_NEG(unset);
|
||||
|
||||
pack_idx_opts.version = strtoul(val, &c, 10);
|
||||
if (pack_idx_opts.version > 2)
|
||||
die(_("unsupported index version %s"), val);
|
||||
@ -3233,7 +3236,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
|
||||
N_("similar to --all-progress when progress meter is shown")),
|
||||
{ OPTION_CALLBACK, 0, "index-version", NULL, N_("<version>[,<offset>]"),
|
||||
N_("write the pack index file in the specified idx format version"),
|
||||
0, option_parse_index_version },
|
||||
PARSE_OPT_NONEG, option_parse_index_version },
|
||||
OPT_MAGNITUDE(0, "max-pack-size", &pack_size_limit,
|
||||
N_("maximum size of each output pack file")),
|
||||
OPT_BOOL(0, "local", &local,
|
||||
|
Reference in New Issue
Block a user