summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 74f16b0)
raw | patch | inline | side by side (parent: 74f16b0)
author | Jeff King <peff@peff.net> | |
Sat, 14 Jun 2008 07:27:21 +0000 (03:27 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 14 Jun 2008 18:39:16 +0000 (11:39 -0700) |
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>
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>
parse-options.c | patch | blob | history | |
t/t1502-rev-parse-parseopt.sh | patch | blob | history |
diff --git a/parse-options.c b/parse-options.c
index acf3fe3a1a82cd99e7bd6e0ff9d6d3d7e344a155..8071711e5db4ae1e2efad7b905c6a1ef0add1467 100644 (file)
--- a/parse-options.c
+++ b/parse-options.c
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);
index d24a47d1149061565822391542c044a7db193ce5..7cdd70a188f7b177652ad8c8d680d36a0d5a9bf7 100755 (executable)
cat > expect.err <<EOF
usage: some-command [options] <args>...
-
+
some-command does foo and bar!
-h, --help show the help