git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: What is missing from Git v2.0
Date: Tue, 22 Apr 2014 11:33:10 -0700	[thread overview]
Message-ID: <xmqqk3ah5i55.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAHGBnuMty-86jfUto=L3muhgEVwVE70FQQY2FJ1bn7AUjfEtLQ@mail.gmail.com> (Sebastian Schuberth's message of "Tue, 22 Apr 2014 09:19:40 +0200")

Sebastian Schuberth <sschuberth@gmail.com> writes:

> On Mon, Apr 21, 2014 at 9:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
>>> If we don't standardize this now people will come up with their own
>>> definitions [1] [2] (and many others if you just search GitHub) which
>>> are again likely to differ (slightly), hindering interoperability.
>>
>> I am afraid that that ship has sailed long time ago, though.
>
> That's most likely true, but it does not get better by postponing this
> even more.

As I already said:

    I think it might be OK to implement them as the lowest priority
    fallback alias, so that '[alias] co = "user's definition"'
    anywhere in the various configuration locations will override
    it.  I am a bit hesitant about adding start-up overhead, though.
    Also I am not sure if people can agree with (1) a broadly wide
    selection of aliases and (2) the actual definitions for them (I
    am OK with "co === checkout" myself, but I'd rather not to even
    think about my Git wasting cycles parsing extra configuration
    items to support "br === branch" at all, for example).

I am not fundamentally opposed.  I just do not think it would add
much value to new people at this point, and it will actively hurt
if we shoved barely cooked one in 2.0.

A few thinking points that are necessary to be worked out, even
before we start imagining a plan to introduce them, off the top of
my head, are these:

 * Should we add many random aliases, or should we limit ourselves
   only to a narrow set that everybody can agree on?

 * What is the additional cognitive load do we feel comfortable
   burdening with the new users?

 * What is the exact mechanism to give these built-in aliases?

Imagine that somebody says "[alias] ci = commit" and a handful of
vocal people on this list agree that it is a good idea.  Many random
websites start mentioning "git ci -a" in their beginner examples.

Users are led to think "ci" is a command just like "commit" and does
the same thing.  Some of them want to always commit everything
before moving to their next task, and want to alias it further, e.g.
"[alias] ci = ci -a"---which would not work.  At that point, the
users need to learn the distinction between native subcommands
(e.g. "commit"), built-in fallback aliases (e.g. "ci") and aliases
of their own in their ~/.gitconfig, and need to learn that only the
first kind and not the second kind cannot be used to define their
own alias (and the users need to learn "commit" at that time as
well).

That could be solved by making "ci" not a built-in fallback alias,
but a new subcommand (then there is no "'foo' in 'git foo' could be
a command or a built-in alias and they behave differently" issue),
and additionally somehow allowing a native subcommand overriden by
end-user alias, but I do not think anybody designed how such an
override would work so far.

So even if we agree that it would be a good idea to have some
default fallback aliases, the set of such aliases we ship must be
limited to a set that everybody can agree on, both in the sense that
"adding alias XX is good" and also in the sense that "alias XX must
be defined as YY".

As you allueded to, the Git userbase is a lot larger than it used to
be back in 2006, one alias, e.g. "[alias] br = branch", that is
reported as either useless or needed to be further tweaked by a
person on this list would mean that we would be either spending
unnecessary start-up cycles (for "useless" case) or adding cognitive
load of having to differente between "branch" and "br" (for "needs
further tweak" case) for thousands of users who would be better off
if we didn't have that specific alias.

So while I understand the desire to have a bit more handholding and
am not fundamentally opposed to the desire, I am not optimistic that
an attempt to implement these "aliases" would result in a very
useful addition to the system, even if done after careful thought.

In any case, this definitely is not a 2.0 material.  I agree that it
would be good to start discussing it early (rather than later) if we
ever want to do such a change.

  parent reply	other threads:[~2014-04-22 18:33 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-20 22:41 What is missing from Git v2.0 Felipe Contreras
2014-04-20 22:47 ` Felipe Contreras
2014-04-21 19:24 ` Sebastian Schuberth
2014-04-21 19:34   ` Felipe Contreras
2014-04-21 19:47     ` Sebastian Schuberth
2014-04-21 20:45       ` Theodore Ts'o
2014-04-21 20:46         ` Felipe Contreras
2014-04-22  7:23           ` Sebastian Schuberth
2014-04-22  8:15             ` Felipe Contreras
2014-04-21 19:39   ` Junio C Hamano
2014-04-22  7:19     ` Sebastian Schuberth
2014-04-22  8:11       ` Felipe Contreras
2014-04-22 18:33       ` Junio C Hamano [this message]
2014-04-22 19:23         ` Felipe Contreras
2014-04-22 20:22           ` Matthieu Moy
2014-04-22 21:01             ` Felipe Contreras
2014-04-22 22:19             ` Junio C Hamano
2014-04-22 21:30           ` Theodore Ts'o
2014-04-22 21:59             ` Felipe Contreras
2014-04-22 22:24               ` David Kastrup
2014-04-24  3:35                 ` Felipe Contreras
2014-04-24  5:18                   ` David Kastrup
2014-04-24 13:39                   ` Andreas Krey
2014-04-24 18:31                     ` Felipe Contreras
2014-04-24 19:16                       ` David Kastrup
2014-04-22 22:25             ` David Lang
2014-04-24  3:37               ` Felipe Contreras
2014-04-24  3:51                 ` David Lang
2014-04-24  3:58                   ` Felipe Contreras
2014-04-24  4:16                 ` James Denholm
2014-04-24  4:12                   ` Felipe Contreras
2014-04-24  6:06                     ` James Denholm
2014-04-24  7:19                       ` Felipe Contreras
2014-04-24  7:39                         ` David Kastrup
2014-04-24  8:23                           ` Felipe Contreras
2014-04-24  9:01                             ` David Kastrup
2014-04-24 18:28                               ` Felipe Contreras
2014-04-24 19:20                                 ` David Lang
2014-04-24 13:41                             ` Theodore Ts'o
2014-04-24 15:00                               ` Stefan Beller
2014-04-24 15:47                                 ` tytso
2014-04-24 17:46                                   ` Stefan Beller
2014-04-24 18:02                                     ` Jonathan Nieder
2014-04-24 18:26                                       ` Felipe Contreras
2014-04-24 19:15                                         ` Jeff King
2014-04-24 18:25                                     ` Felipe Contreras
2014-04-24 18:17                                   ` Felipe Contreras
2014-04-25  6:59                                   ` Matthieu Moy
2014-04-25  7:35                                 ` Philippe Vaucher
2014-04-24 18:38                               ` Felipe Contreras
2014-04-24 19:55                               ` luc.linux
2014-04-25  2:22                                 ` Javier Domingo Cansino
2014-04-25  2:35                                   ` Felipe Contreras
2014-04-25  7:48                                     ` Philippe Vaucher
2014-04-25  7:52                                       ` Felipe Contreras
2014-04-25 13:35                                       ` Theodore Ts'o
2014-04-25 14:23                                         ` Philippe Vaucher
2014-04-25 14:40                                           ` Theodore Ts'o
2014-04-25 15:54                                             ` Philippe Vaucher
2014-04-25 17:50                                               ` Felipe Contreras
2014-04-25 17:45                                         ` Felipe Contreras
2014-04-25 18:24                                           ` Jeff King
2014-04-25 18:27                                             ` Felipe Contreras
2014-04-25 18:57                                               ` Jeff King
2014-04-25 18:57                                                 ` Felipe Contreras
2014-04-25 19:12                                                   ` Jeff King
2014-04-25 19:27                                                     ` Felipe Contreras
2014-04-25  5:13                                   ` David Kastrup
2014-04-25 15:41                                     ` Jonathan Nieder
2014-04-25 15:59                                       ` David Kastrup
2014-04-25 16:14                                         ` Jonathan Nieder
2014-04-22 22:03         ` Junio C Hamano
2014-04-24  3:26           ` Felipe Contreras
2014-04-22  2:12   ` brian m. carlson
2014-04-22  5:10     ` Felipe Contreras
2014-04-22  5:19 ` David Aguilar
2014-04-22  5:38   ` Felipe Contreras

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=xmqqk3ah5i55.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sschuberth@gmail.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 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 NNTP newsgroup(s).