git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Brandon Casey <drafnel@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] parse-options: only insert newline in help text if needed
Date: Mon, 25 Sep 2017 14:39:23 +0900	[thread overview]
Message-ID: <xmqqing7e3qs.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1506312485-8370-3-git-send-email-drafnel@gmail.com> (Brandon Casey's message of "Sun, 24 Sep 2017 21:08:05 -0700")

Brandon Casey <drafnel@gmail.com> writes:

> Currently, when parse_options() produces a help message it always emits
> a blank line after the usage text to separate it from the options text.
> If the option spec does not define any switches, or only defines hidden
> switches that will not be displayed, then the help text will end up with
> two trailing blank lines instead of one.  Let's defer emitting the blank
> line between the usage text and the options text until it is clear that
> the options section will not be empty.

This somehow looks familiar.  I think (together with the fix in 2/3)
this makes it definitely better.  

I also wonder if we want the final blank line, but that is sort-of a
different issue.

Thanks.

  reply	other threads:[~2017-09-25  5:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25  4:08 [PATCH 1/3] t0040,t1502: Demonstrate parse_options bugs Brandon Casey
2017-09-25  4:08 ` [PATCH 2/3] parse-options: write blank line to correct output stream Brandon Casey
2017-09-25  4:08 ` [PATCH 3/3] parse-options: only insert newline in help text if needed Brandon Casey
2017-09-25  5:39   ` Junio C Hamano [this message]
2017-09-25  5:53     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqing7e3qs.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).