summaryrefslogtreecommitdiff
path: root/parse-options.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-12-15 03:24:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-12-15 03:24:33 (GMT)
commitbf29f074ed7019abb53398c4cd5659d9f939d9a8 (patch)
tree0980dba5e1b347ef0c2fad32cb36923dd64b83c5 /parse-options.c
parent6be6e6629fe9da1bfef904d2615536ad0db14e1d (diff)
parenta92ec7efe0ad25f1c2047230c0324dcb54ce1cfc (diff)
downloadgit-bf29f074ed7019abb53398c4cd5659d9f939d9a8.zip
git-bf29f074ed7019abb53398c4cd5659d9f939d9a8.tar.gz
git-bf29f074ed7019abb53398c4cd5659d9f939d9a8.tar.bz2
Merge branch 'nd/show-gitcomp-compilation-fix' into maint
Portability fix for a recent update to parse-options API. * nd/show-gitcomp-compilation-fix: parse-options: fix SunCC compiler warning
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse-options.c b/parse-options.c
index 3b874a8..6932eaf 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -516,7 +516,7 @@ static int show_gitcomp(struct parse_opt_ctx_t *ctx,
show_negated_gitcomp(original_opts, -1);
show_negated_gitcomp(original_opts, nr_noopts);
fputc('\n', stdout);
- exit(0);
+ return PARSE_OPT_COMPLETE;
}
static int usage_with_options_internal(struct parse_opt_ctx_t *,
@@ -638,6 +638,8 @@ int parse_options(int argc, const char **argv, const char *prefix,
case PARSE_OPT_HELP:
case PARSE_OPT_ERROR:
exit(129);
+ case PARSE_OPT_COMPLETE:
+ exit(0);
case PARSE_OPT_NON_OPTION:
case PARSE_OPT_DONE:
break;