Thread (1 message) 1 message, 1 author, 2017-08-25

Re: [PATCH] usage_with_options: omit double new line on empty option list

From: Junio C Hamano <hidden>
Date: 2017-08-25 21:17:32

Stefan Beller [off-list ref] 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:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help