]> git.ipfire.org Git - thirdparty/git.git/blobdiff - parse-options.c
Merge branch 'nd/show-gitcomp-compilation-fix' into maint
[thirdparty/git.git] / parse-options.c
index 3b874a83a0c897845deeec37c1a3b85e0b625050..6932eaff6144bdf9fc8f430f149a73ade00f0d8b 100644 (file)
@@ -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;