summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2022-07-10 17:16:45 +0200
committerJunio C Hamano <gitster@pobox.com>2022-07-10 14:53:48 -0700
commitcc74afb83f7bd57002ce791e66290b20120ff9f3 (patch)
treebe9f09b703071b9f1d007075b0207fa2b9570cc5 /builtin/commit-graph.c
parente4a4b31577c7419497ac30cebe30d755b97752c5 (diff)
multi-pack-index: simplify handling of unknown --options
Although parse_options() can handle unknown --options just fine, none of 'git multi-pack-index's subcommands rely on it, but do it on their own: they invoke parse_options() with the PARSE_OPT_KEEP_UNKNOWN flag, then check whether there are any unparsed arguments left, and print usage and quit if necessary. Drop that PARSE_OPT_KEEP_UNKNOWN flag to let parse_options() handle unknown options instead, which has the additional benefit that it prints not only the usage but an "error: unknown option `foo'" message as well. Do leave the unparsed arguments check to catch any unexpected non-option arguments, though, e.g. 'git multi-pack-index write foo'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions