avoid whitespace on empty line in automatic usage message
When outputting a usage message with a blank line in the header, we would output a line with four spaces. Make this truly a blank line. This helps us remove trailing whitespace from a test vector. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
74f16b0c6f
commit
44d86e910d
@ -312,8 +312,12 @@ void usage_with_options_internal(const char * const *usagestr,
|
||||
fprintf(stderr, "usage: %s\n", *usagestr++);
|
||||
while (*usagestr && **usagestr)
|
||||
fprintf(stderr, " or: %s\n", *usagestr++);
|
||||
while (*usagestr)
|
||||
fprintf(stderr, " %s\n", *usagestr++);
|
||||
while (*usagestr) {
|
||||
fprintf(stderr, "%s%s\n",
|
||||
**usagestr ? " " : "",
|
||||
*usagestr);
|
||||
usagestr++;
|
||||
}
|
||||
|
||||
if (opts->type != OPTION_GROUP)
|
||||
fputc('\n', stderr);
|
||||
|
Loading…
Reference in New Issue
Block a user