All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] usage_with_options: omit double new line on empty option list
Date: Fri, 25 Aug 2017 14:17:22 -0700	[thread overview]
Message-ID: <xmqq4lsvs5y5.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAGZ79kY6-R4Tt45BfnncH7tE46K8FG7RBDk+qb-tCU97CVQHvA@mail.gmail.com> (Stefan Beller's message of "Fri, 25 Aug 2017 14:06:02 -0700")

Stefan Beller <sbeller@google.com> writes:

> Upon closer inspection, I have the impression that f389c808b6
> (Rework make_usage to print the usage message immediately,
> 2007-10-14) introduced the extra new line without giving a rationale.

I do not think that is the case.  The code before that patch
collected all the usage strings in a strbuf sb, which had lines with
their own terminating LFs, and then called usage() on sb.buf, which
added an extra LF, so I think the commit was a faithful and bug-to-bug
compatible rewrite.

But that does not matter in the bigger picture, as long as everybody
agrees with the following:

>> The other fputc('\n', outfile) that this version of the patch
>> touches is what I had trouble with, and I still do.  There must be a
>> similar rationale like the previous one, i.e. "We have finished
>> giving the usage, and we have finished showing all the options.  Now
>> we are about to further show X, so let's have a blank line here so
>> that what we have wrote will be separated from it", but I cannot
>> tell what that X is.
>
> Oh. I assumed that this X is the the next command in the users
> terminal, but I checked other commands and that is not the case
> at all (at least ls, vi, tar)

Thanks.

  reply	other threads:[~2017-08-25 21:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <xmqqy3q7sge2.fsf@gitster.mtv.corp.google.com/>
2017-08-25 19:28 ` [PATCH] usage_with_options: omit double new line on empty option list Stefan Beller
2017-08-25 20:27   ` Junio C Hamano
2017-08-25 21:06     ` Stefan Beller
2017-08-25 21:17       ` Junio C Hamano [this message]
2017-08-25 16:48 Stefan Beller
2017-08-25 17:18 ` Junio C Hamano
2017-08-25 17:19   ` Stefan Beller
2017-08-25 17:21   ` Junio C Hamano
2017-08-25 17:31 ` 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

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

  git send-email \
    --in-reply-to=xmqq4lsvs5y5.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.