git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Adam Dinwoodie <adam@dinwoodie.org>,
	Git List <git@vger.kernel.org>, Johan Herland <johan@herland.net>
Subject: Re: [PATCH] notes: add `rm` and `delete` commands
Date: Fri, 10 Nov 2017 12:14:44 +0900	[thread overview]
Message-ID: <xmqq1sl6j04b.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAPig+cRq7thrPtzS0V6o-wMhHyYWKeWg-xOQhnWCO5sLE=kDcw@mail.gmail.com> (Eric Sunshine's message of "Thu, 9 Nov 2017 11:18:01 -0500")

Eric Sunshine <sunshine@sunshineco.com> writes:

> or against the change:
>
>     - synonym bloat; balloons documentation
>     - steals command verbs from potential future features
>     - ...

I tend to agree with these two (and if I were to replace the "..."
with something concrete, this change is not desirable because it
will force us to add all these three when we introduce "remove"
elsewhere in the system).

Having said that, this remids me of an age-old topic we discussed in
a distant past but stalled due to lack of strong drive, which is:

    Some git subcommands take command verb (e.g. "git notes 'remove'")
    while others take command mode flags (e.g. "git branch --delete"),
    and the users need to remember them, which is not ideal.

I think the consensus back then, if we were to aim for consistency
by uniformly using only one of the two, is to use the command mode
flags, simply because existing commands that have the primary mode
and take an optional command mode flag [*1*] cannot be migrated to
the command verb UI safely and sanely.

And then, if we are not careful when we standardize all subcommands
to take command mode flags, we might end up with a situation where
some subcommand say "--remove" while other say "--delete", and some
users will wish to rectify that situation by adding an alias defined
for these flags---I view this patch as a part of that possible
future topic ;-).


[Footnote]

*1* For example, "git branch" by default is in the branch creation
    mode, but it can be told to work in its branch deletion mode
    with "--delete".

    If we were to standardize on command verbs, is "git branch
    delete" a deprecated relic from the old world that wants to
    create a branch whose name is 'delete', or is it done by a
    script in the new world that collected names of branches to
    delete and asked "git branch delete $to_delete" to delete all of
    them, where the $to_delete variable happened to end up empty?

    With command mode flags, we do not have to worry about such an
    ambiguity during and after transition.

  reply	other threads:[~2017-11-10  3:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 13:46 [PATCH] notes: add `rm` and `delete` commands Adam Dinwoodie
2017-11-09 16:18 ` Eric Sunshine
2017-11-10  3:14   ` Junio C Hamano [this message]
2017-11-10 10:58     ` Adam Dinwoodie

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=xmqq1sl6j04b.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=sunshine@sunshineco.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).