git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Jeff King <peff@peff.net>,
	git@vger.kernel.org, David Aguilar <davvid@gmail.com>
Subject: Re: [PATCH v3] build: add default aliases
Date: Sat, 28 Sep 2013 17:41:41 -0500	[thread overview]
Message-ID: <CAMP44s0UcP5AhWrm7vjBDLvY6CupzL03kys1YXs9cpGJNxkBBA@mail.gmail.com> (raw)
In-Reply-To: <20130924183958.GK9464@google.com>

On Tue, Sep 24, 2013 at 1:39 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Jeff King wrote:
>> On Sat, Sep 21, 2013 at 02:20:21PM -0500, Felipe Contreras wrote:
>
>>> For now simply add a few common aliases.
>>>
>>>   co = checkout
>>>   ci = commit
>>>   rb = rebase
>>>   st = status
>>
>> Are these the best definitions of those shortcuts? It seems[1] that some
>> people define "ci" as "commit -a", and some people define "st" as
>> "status -s" or even "status -sb".
>
> I feel bad about having waited for 4 rounds of this patch to say this,
> but the basic change (providing "co", "ci", etc. as aliases by
> default) does not look well thought through.

To you.

> It would be a different story if this were a patch to update
> documentation to suggest adding such aliases at the same time as
> telling Git what your name is.  The user manual doesn't explain how to
> set up aliases at all yet, and that should be fixed.

That's a completely different subject.

> But making 'ci' a synonym of another command by default while still
> keeping its definition configurable would be doing people a
> disservice, I fear.

And I and many (most) users disagree.

> As long as 'ci' works out of the box, it will
> start showing up in examples and used in suggestions over IRC, etc,
> which is great.

It might, or...

> Unfortunately that means that anyone who has 'ci'
> defined to mean something different can no longer use those examples,
> that advice from IRC, and so on.  So in the world where 'ci' is a
> synonym for 'commit' by default, while people still *can* redefine
> 'ci' to include whatever options they like (e.g., "-a"), actually
> carrying out such a personal customization is asking for trouble.

Precisely for this reason it might not. If people know aliases can be
different in different machines, they would avoid them in
documentation which is meant for all machines.

If you truly want to be pedantic, you could add a warning if the
default alias is not used, and this warning gets silenced if the user
configures the alias manually.

> Incidentally, that is also the reason git already doesn't allow
> aliases to override built-in commands such as "git commit", even
> though it would be convenient to some to not have to remember to add
> "-a" each time.  As consolation we have been able to say "But you can
> take the even shorter-and-sweeter 'git ci' and make it mean whatever
> you want".  Now we should take that avenue away for people?

Who is taking away that avenue? Certainly not this patch.

> Bad idea.

Only if you assume your hypothesis is a fact, which is not, and even
if you do, it's still not.

> Hope that helps,

The project? No, it doesn't. Virtually every VCS out there has default aliases,
and Git somehow cannot manage to get them done.

And BTW, look what I can do in mercurial:

.hgrc
---
[alias]
status = status --all
---

OMG! The world is going to end! No, it's not, it's no problem. What you think
is so clearly a bad idea, seems to be doing just fine in Mercurial.

-- 
Felipe Contreras

  parent reply	other threads:[~2013-09-28 22:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 19:20 [PATCH v3] build: add default aliases Felipe Contreras
2013-09-24  4:53 ` Jeff King
2013-09-24  5:32   ` Felipe Contreras
2013-09-24  5:37     ` Jeff King
2013-09-24  5:49       ` Felipe Contreras
2013-09-24  6:18         ` Jeff King
2013-09-24  6:41           ` Felipe Contreras
2013-09-24  6:46             ` Jeff King
2013-09-24  6:59               ` Felipe Contreras
2013-09-24 18:39   ` Jonathan Nieder
2013-09-24 19:30     ` John Szakmeister
2013-09-28 22:41     ` Felipe Contreras [this message]
2013-09-29  3:18       ` Michael Haggerty
2013-09-29  3:37         ` Felipe Contreras
2013-09-30 19:33         ` Jonathan Nieder
2013-10-01  1:12           ` Duy Nguyen
2013-10-15 22:34   ` Junio C Hamano
2013-10-16  3:43     ` Felipe Contreras
2013-10-17 19:51       ` Junio C Hamano
2013-10-17 21:34         ` Felipe Contreras
2013-09-24  9:19 ` John Szakmeister
2013-09-24 10:25   ` Felipe Contreras
2013-09-24 11:06     ` John Szakmeister
2013-09-24 14:35       ` Felipe Contreras
2013-09-25 13:33         ` John Szakmeister
2013-09-25 14:29           ` Felipe Contreras
2013-09-25 14:55             ` Matthieu Moy
2013-09-25 15:08               ` Felipe Contreras
2013-09-25 15:13                 ` Matthieu Moy
2013-09-25 15:16                   ` Felipe Contreras
2013-09-25 16:05                     ` Matthieu Moy
2013-09-25 16:36                       ` Felipe Contreras
2013-09-24 15:21 ` SZEDER Gábor
2013-09-24 15:33   ` [PATCH v4] " 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

  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=CAMP44s0UcP5AhWrm7vjBDLvY6CupzL03kys1YXs9cpGJNxkBBA@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /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).