git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Lea Wiemann <lewiemann@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/4] fix whitespace violations in test scripts
Date: Sat, 14 Jun 2008 00:20:45 -0700	[thread overview]
Message-ID: <7v1w30iisy.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080614065119.GA9006@sigill.intra.peff.net> (Jeff King's message of "Sat, 14 Jun 2008 02:51:19 -0400")

Jeff King <peff@peff.net> writes:

> diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh
> index d24a47d..7cdd70a 100755
> --- a/t/t1502-rev-parse-parseopt.sh
> +++ b/t/t1502-rev-parse-parseopt.sh
> @@ -5,7 +5,7 @@ test_description='test git rev-parse --parseopt'
>  
>  cat > expect.err <<EOF
>  usage: some-command [options] <args>...
> -    
> +
>      some-command does foo and bar!
>  
>      -h, --help            show the help

This part unfortunately falls into the same category as your [3/4].

---

 parse-options.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/parse-options.c b/parse-options.c
index acf3fe3..5e56bb5 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -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) {
+		if (**usagestr)
+			fprintf(stderr, "    %s", *usagestr);
+		putc('\n', stderr);
+		usagestr++;
+	}
 
 	if (opts->type != OPTION_GROUP)
 		fputc('\n', stderr);

  parent reply	other threads:[~2008-06-14  7:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 22:35 [PATCH] t/.gitattributes: only ignore whitespace errors in test files Lea Wiemann
2008-06-13  6:06 ` Jeff King
2008-06-13  7:49   ` [PATCH v2] " Lea Wiemann
2008-06-13 10:00   ` [PATCH] " Junio C Hamano
2008-06-14  6:48     ` Jeff King
2008-06-14  6:51       ` [PATCH 1/4] fix whitespace violations in test scripts Jeff King
2008-06-14  7:01         ` Jeff King
2008-06-14  7:20         ` Junio C Hamano [this message]
2008-06-14  7:22           ` Jeff King
2008-06-14  7:25             ` [PATCH v2 1/5] " Jeff King
2008-06-14  7:26             ` [PATCH v2 2/5] mask necessary whitespace policy " Jeff King
2008-06-14  7:27             ` [PATCH v2 3/5] avoid whitespace on empty line in automatic usage message Jeff King
2008-06-14  7:27             ` [PATCH v2 4/5] avoid trailing whitespace in zero-change diffstat lines Jeff King
2008-06-14  7:28             ` [PATCH v2 5/5] enable whitespace checking of test scripts Jeff King
2008-06-14  6:54       ` [PATCH 2/4] mask necessary whitespace policy violations in " Jeff King
2008-06-14  6:56       ` [PATCH 3/4] avoid trailing whitespace in zero-change diffstat lines Jeff King
2008-06-14  7:22         ` Junio C Hamano
2008-06-14  7:30           ` Jeff King
2008-06-14  6:56       ` [PATCH 4/4] enable whitespace checking of test scripts Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v1w30iisy.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=lewiemann@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).