diff options
author | Jeff King <peff@peff.net> | 2023-03-28 22:58:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-28 23:11:24 +0200 |
commit | 4a4d9706ade6dcdca7cc16372f1f83f5011a5d2b (patch) | |
tree | 4bdddfff0ba30f3134d12c8fe796137f008bd755 /parse-options-cb.c | |
parent | t/helper: mark unused argv/argc arguments (diff) | |
download | git-4a4d9706ade6dcdca7cc16372f1f83f5011a5d2b.tar.xz git-4a4d9706ade6dcdca7cc16372f1f83f5011a5d2b.zip |
parse-options: drop parse_opt_unknown_cb()
This low-level callback was introduced in ce564eb1bd5 (parse-options:
add parse_opt_unknown_cb(), 2016-09-05) so that we could advertise
--indent-heuristic in git-blame's "-h" output, even though the option is
actually handled in parse_revision_opt(). We later stopped doing so in
44ae131e384 (builtin/blame.c: remove '--indent-heuristic' from usage
string, 2019-10-28).
This is a weird thing to do, and in the intervening years, we've never
used it again. Let's drop the helper in the name of simplicity.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r-- | parse-options-cb.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c index d346dbe210..4729277aa6 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -214,21 +214,6 @@ int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset) } /** - * Report that the option is unknown, so that other code can handle - * it. This can be used as a callback together with - * OPTION_LOWLEVEL_CALLBACK to allow an option to be documented in the - * "-h" output even if it's not being handled directly by - * parse_options(). - */ -enum parse_opt_result parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx, - const struct option *opt, - const char *arg, int unset) -{ - BUG_ON_OPT_ARG(arg); - return PARSE_OPT_UNKNOWN; -} - -/** * Recreates the command-line option in the strbuf. */ static int recreate_opt(struct strbuf *sb, const struct option *opt, |