Thread (24 messages) flat view 24 messages, 7 authors, 2016-06-15

Re: [PATCH v3] build: add default aliases

From: John Szakmeister <hidden>
Date: 2016-06-15 22:58:53

On Tue, Sep 24, 2013 at 2:39 PM, Jonathan Nieder [off-list ref] wrote:
Jeff King wrote:
quoted
On Sat, Sep 21, 2013 at 02:20:21PM -0500, Felipe Contreras wrote:
quoted
quoted
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.

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.
Yes, better documentation around aliases would be a good idea.
But making 'ci' a synonym of another command by default while still
keeping its definition configurable would be doing people a
disservice, I fear.  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.  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.
I'm not sure I agree.  Yes, if someone has configured their shortcut
differently, they may not be able to use the example exactly.  OTOH,
shells have aliases, and while there are sometimes problems, I think
most people overcome them.  I don't see the situation being very
different here.

FWIW, I'm not overly convinced one way or another.  What I can say is,
in the circles I run in, I can only think of one person has gone
without setting up aliases to commit (ci), status (st), and checkout
(co).  The full names are simply to long for day-to-day usage.

-John
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help