Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/parse-options.c b/parse-options.c
index 4a8d380ceb..b00d868816 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -1025,21 +1025,14 @@ static int usage_indent(FILE *outfile)
return fprintf(outfile, " ");
}
-#define USAGE_OPTS_WIDTH 24
-#define USAGE_GAP 2
+#define USAGE_OPTS_WIDTH 26
static void usage_padding(FILE *outfile, size_t pos)
{
- int pad;
- if (pos == USAGE_OPTS_WIDTH + 1)
- pad = -1;
- else if (pos <= USAGE_OPTS_WIDTH)
- pad = USAGE_OPTS_WIDTH - pos;
- else {
- fputc('\n', outfile);
- pad = USAGE_OPTS_WIDTH;
- }
- fprintf(outfile, "%*s", pad + USAGE_GAP, "");
+ if (pos < USAGE_OPTS_WIDTH)
+ fprintf(outfile, "%*s", USAGE_OPTS_WIDTH - (int)pos, "");
+ else
+ fprintf(outfile, "\n%*s", USAGE_OPTS_WIDTH, "");
}
static const struct option *find_option_by_long_name(const struct option *opts,