git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mike Rappazzo <rappazzo@gmail.com>,
	"Vanderhoof, Tzadik" <tzadik.vanderhoof@optum360.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: merge --no-ff is NOT mentioned in help
Date: Thu, 17 Nov 2016 14:21:42 -0800	[thread overview]
Message-ID: <20161117222142.mca6lmhj5mvl4gbp@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqr36anibl.fsf@gitster.mtv.corp.google.com>

On Thu, Nov 17, 2016 at 09:10:22AM -0800, Junio C Hamano wrote:

> People interested may want to try the attached single-liner patch to
> see how the output from _ALL_ commands that use parse-options API
> looks when given "-h".  It could be that the result may not be too
> bad.

The output is less ugly than I expected, but still a bit cluttered IMHO.
I was surprised that the column-adjustment did not need tweaked, but the
code correctly increments "pos" from the return value of fprintf, which
just works.

Looking at the output for --ff, though:

   --[no-]ff             allow fast-forward (default)

I do not think it's improving the situation nearly as much as if we made
the primary option "--no-ff" with a NONEG flga, and then added back in a
HIDDEN "--ff". I thought we had done that in other cases, but I can't
seem to find any. But it would make "--no-ff" the primary form, which
makes sense, as "--ff" is already the default.

Another option would be to teach parse-options to somehow treat the
negated form as primary in the help text. That's a bit more code, but
might be usable in other places.

-Peff

  parent reply	other threads:[~2016-11-17 22:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 15:16 merge --no-ff is NOT mentioned in help Vanderhoof, Tzadik
2016-11-16 15:36 ` Mike Rappazzo
2016-11-16 15:48   ` Vanderhoof, Tzadik
2016-11-16 15:57     ` Mike Rappazzo
2016-11-17 14:03       ` Vanderhoof, Tzadik
2016-11-17 17:10       ` Junio C Hamano
2016-11-17 19:18         ` Torsten Bögershausen
2016-11-17 22:21         ` Jeff King [this message]
2016-11-18 14:51           ` Vanderhoof, Tzadik

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=20161117222142.mca6lmhj5mvl4gbp@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rappazzo@gmail.com \
    --cc=tzadik.vanderhoof@optum360.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.
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).