git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jul 6, 2021, 21:54 UTC
Message-ID
<60e4d10bd8127_1c428120848@natae.notmuch>
In-Reply-To
<YOBA6s7wXUVmh++d@coredump.intra.peff.net>
Jeff King wrote:
Show 14 quoted lines
> 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@gmail.com/
> 
> (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
Previous: Jeff King
Message 41 of 41 in “Default aliases”
  1. 0/5 Default aliasesFelipe Contreras, Jul 2, 2021
  2. 1/5 test: add missing whitespacesFelipe Contreras, Jul 2, 2021
  3. 2/5 config: trivial style fixFelipe Contreras, Jul 2, 2021
  4. 3/5 config: trivial struct initialization cleanupFelipe Contreras, Jul 2, 2021
  5. 4/5 config: initialize origin_type correctlyFelipe Contreras, Jul 2, 2021
  6. 5/5 config: add default aliasesFelipe Contreras, Jul 2, 2021
  7. Andreas SchwabJul 2, 2021
  8. Felipe ContrerasJul 2, 2021
  9. Andreas SchwabJul 2, 2021
  10. Felipe ContrerasJul 2, 2021
  11. Andreas SchwabJul 2, 2021
  12. martinJul 2, 2021
  13. Felipe ContrerasJul 2, 2021
  14. martinJul 2, 2021
  15. Randall S. BeckerJul 2, 2021
  16. Ævar Arnfjörð BjarmasonJul 2, 2021
  17. Randall S. BeckerJul 2, 2021
  18. martinJul 2, 2021
  19. Felipe ContrerasJul 2, 2021
  20. Randall S. BeckerJul 2, 2021
  21. Felipe ContrerasJul 2, 2021
  22. Junio C HamanoJul 2, 2021
  23. Felipe ContrerasJul 2, 2021
  24. Felipe ContrerasJul 2, 2021
  25. martinJul 2, 2021
  26. Felipe ContrerasJul 2, 2021
  27. Randall S. BeckerJul 2, 2021
  28. Felipe ContrerasJul 2, 2021
  29. Felipe ContrerasJul 2, 2021
  30. martinJul 2, 2021
  31. Felipe ContrerasJul 2, 2021
  32. Ævar Arnfjörð BjarmasonJul 2, 2021
  33. Felipe ContrerasJul 2, 2021
  34. martinJul 2, 2021
  35. Felipe ContrerasJul 2, 2021
  36. Randall S. BeckerJul 5, 2021
  37. Randall S. BeckerJul 6, 2021
  38. Felipe ContrerasJul 6, 2021
  39. Philip OakleyJul 10, 2021
  40. Jeff KingJul 3, 2021
  41. Felipe ContrerasJul 6, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.