Re: [PATCH 5/5] config: add default aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King wrote:
> On Fri, Jul 02, 2021 at 05:05:06AM -0500, Felipe Contreras wrote:
> 
> > These are all the aliases everyone agrees are essential.
> > 
> > Virtually all VCS in the world have aliases, except git, so let's change
> > that.
> 
> For anyone reviewing or discussing, here's an older thread on the same
> topic:
> 
>   https://lore.kernel.org/git/1379791221-29925-1-git-send-email-felipe.contreras@xxxxxxxxx/
> 
> (I don't mean to imply that we can't revisit old decisions; but some of
> the thoughts there are worth considering as input).

Re-reading that thread--and filtering all the noise--the two thoughts
that I think are worth considering are:

 1. A default alias might leak into some unofficial documentation, and
    people with a different alias could be surprised after typing that
    command and finding out it does a different thing.

 2. A person might be used to an alias doing one thing, move to a
    different machine, and be surprised that the default alias does a
    diffrent thing.

But as mentioned in that thread those two are *existing* issues. People
using certain configurations (not even aliases) are surprised when the
same command does a different thing. And also people use their aliases
in unofficial documentation already.

Default aliases would in fact make the situation less worse because if
one of these aliases leaks into unofficial documentation, there's a
higher chance that the command will do what was intended.

The counter-arguments were not addressed, so the conclussion is that
default aliases would *not* make the existing problems worse.


That being said, there's ways to mitigate these problems, for example we
could add an avdice stating that a default alias is currently being
used, something like:

  hint: You are using a default alias: co -> checkout.
  hint:
  hint: If you want to incorporate this alias into your personal
  hint: aliases, type:
  hint:
  hint:  git config --global alias.co checkout
  hint:
  hint: Disable this message with "git config advice.defaultaliases false"

There's many other ways to mitigate the issues. It would be in the best
inerest of the probject to explore all these possibilities to their full
extent instead of just throwing the towel and stay in the current
undesirable state.

Cheers.

-- 
Felipe Contreras



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux