summaryrefslogtreecommitdiff
path: root/parse-options.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-03-20 08:16:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-20 09:34:09 (GMT)
commit5205749d2ca81ea1d124ba7d799f4b319084ca68 (patch)
tree777ad96badb367097e174acf50c6810ab9a4d4f1 /parse-options.c
parent0f804b0bac39fb696ea74b8dd59549935ec9ca00 (diff)
downloadgit-5205749d2ca81ea1d124ba7d799f4b319084ca68.zip
git-5205749d2ca81ea1d124ba7d799f4b319084ca68.tar.gz
git-5205749d2ca81ea1d124ba7d799f4b319084ca68.tar.bz2
parse-options: drop unused ctx parameter from show_gitcomp()
The completion display doesn't actually care about where we are in the parsing. It's generated completely from the set of available options. So we don't need to see the parse-options context struct at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/parse-options.c b/parse-options.c
index cec7452..ade83a7 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -523,8 +523,7 @@ static void show_negated_gitcomp(const struct option *opts, int nr_noopts)
}
}
-static int show_gitcomp(struct parse_opt_ctx_t *ctx,
- const struct option *opts)
+static int show_gitcomp(const struct option *opts)
{
const struct option *original_opts = opts;
int nr_noopts = 0;
@@ -603,7 +602,7 @@ int parse_options_step(struct parse_opt_ctx_t *ctx,
/* lone --git-completion-helper is asked by git-completion.bash */
if (ctx->total == 1 && !strcmp(arg + 1, "-git-completion-helper"))
- return show_gitcomp(ctx, options);
+ return show_gitcomp(options);
if (arg[1] != '-') {
ctx->opt = arg + 1;