parse-options: never suppress arghelp if LITERAL_ARGHELP is set
[gitweb.git] / parse-options.c
index 578035671a8369c008ac27779faf34c1ab39eeec..632c1346c6bc6fd17a516b82771ba607961d3e4f 100644 (file)
@@ -537,7 +537,8 @@ static int usage_with_options_internal(struct parse_opt_ctx_t *ctx,
                if (opts->type == OPTION_NUMBER)
                        pos += fprintf(outfile, "-NUM");
 
-               if (!(opts->flags & PARSE_OPT_NOARG))
+               if ((opts->flags & PARSE_OPT_LITERAL_ARGHELP) ||
+                   !(opts->flags & PARSE_OPT_NOARG))
                        pos += usage_argh(opts, outfile);
 
                if (pos <= USAGE_OPTS_WIDTH)