All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Martin Ågren" <martin.agren@gmail.com>,
	"Thomas Rikl" <trikl@online.de>,
	"Thomas Gummerer" <t.gummerer@gmail.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Jeff King" <peff@peff.net>
Subject: Re: [Alt. PATCH] ls-remote: deprecate -h as short for --heads
Date: Wed, 18 Oct 2017 08:22:04 +0900	[thread overview]
Message-ID: <xmqqk1ztmkbn.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <774f08bd-3172-0083-1544-e5f68f6798fa@web.de> (=?utf-8?Q?=22R?= =?utf-8?Q?en=C3=A9?= Scharfe"'s message of "Tue, 17 Oct 2017 17:39:14 +0200")

René Scharfe <l.s.r@web.de> writes:

> Stop advertising -h as the short equivalent of --heads, because it's
> used for showing a short help text for almost all other git commands.
> Since the ba5f28bf79 (ls-remote: use parse-options api) it has only
> been working when used together with other parameters anyway.
>
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
> That would be step on the way towards more consistent command line
> switches, in the same vein as d69155119 (t0012: test "-h" with
> builtins).

Sorry, but I am not sure whom this and the other approach are trying
to help.

The rule we have currently seems to be that "git cmd -h" (no other
arguments) consistently gives a short help, and if a subcommand
supports an option "-h" specific to it that is not about giving a
short help, the caller needs to be aware of it to invoke the option,
by making sure that there is some other arguments on the command
line if "-h" form of that subcommand specific option is used, by
doing e.g. "git ls-remote -h origin" or "git ls-remote --head".

I can see that this "alternative" approach makes it less convenent
for folks who have followed that rule by hiding "-h" (with the
intention of deprecating and possibly removing it in the future) and
encouraging (and later foring) "--head" to be used instead.  

The other approach burdens new users by changing the rule to "some
subcommands that have their own '-h' option cannot be asked for a
brief usage with 'git cmd -h'".  But the thing is, these new users
who do not know which subcommands do have their own '-h' and which
ones do not are the ones that benefit most from the consistent "'git
cmd -h' with no other argument gets short help" rule.

When making a backward incompatible change, it is asking us to go to
those who are inconvenienced and say "I am sorry that we are making
things less convenient for you, but by doing so we can gain this
greater good which is ...".  I can explain how this and the other
approach make things less convenient for existing or new users, but
I am having a hard time formulating what the greater good is.

In short, I cannot sell this change to our users.  Please help me do
so if you want this (or the other) change made to our system.


  parent reply	other threads:[~2017-10-17 23:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-15 10:02 Bug: git ls-remote -h / --head results differ in output Thomas Rikl
2017-10-15 11:08 ` Martin Ågren
2017-10-15 13:26   ` René Scharfe
2017-10-17 15:39     ` [PATCH 1/2] git: add NO_INTERNAL_HELP flag for builtins René Scharfe
2017-10-17 17:39       ` Jonathan Nieder
2017-10-17 15:39     ` [PATCH 2/2] ls-remote: use PARSE_OPT_NO_INTERNAL_HELP René Scharfe
2017-10-17 17:42       ` Jonathan Nieder
2017-10-17 17:42       ` Martin Ågren
2017-10-17 15:39     ` [Alt. PATCH] ls-remote: deprecate -h as short for --heads René Scharfe
2017-10-17 17:40       ` Martin Ågren
2017-10-17 17:43       ` Jonathan Nieder
2017-10-17 23:22       ` Junio C Hamano [this message]
2017-10-19 18:26         ` René Scharfe
2017-10-19 20:32           ` Jeff King
2017-10-20  1:04             ` Junio C Hamano
2017-10-20  3:05               ` Jeff King
2017-10-20  5:35                 ` Junio C Hamano
2017-10-21  7:16                   ` Jeff King
2017-10-21 10:14                   ` René Scharfe
2017-10-21 12:18                     ` Junio C Hamano
2017-10-23 15:05                       ` René Scharfe
2017-10-24  0:52                         ` Junio C Hamano
2017-10-24 18:26                           ` René Scharfe

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=xmqqk1ztmkbn.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=l.s.r@web.de \
    --cc=martin.agren@gmail.com \
    --cc=peff@peff.net \
    --cc=t.gummerer@gmail.com \
    --cc=trikl@online.de \
    /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.