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

allowing aliases to override builtins to support default options

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 6, 2009, 22:30 UTC
Message-ID
<76718490903061430s2fbea2dfibe06282fd22b1588@mail.gmail.com>

Currently git does not allow aliases to override builtins. I understand the reasoning behind this, but I wonder if it's overly conservative.

Most shells support overriding commands with aliases, and I'm not sure why git needs to be more conservative than the shell. (Although, I will say, I hate when vendors alias rm to "rm -i", etc...)

It seems like this would be an elegant way to support default options. Were it to be supported, it should probably have an escape hatch, such as git --no-alias COMMAND, and it should probably only apply to porcelains.

Thoughts?
j.
Next: Sverre Rabbelier
Message 1 of 7 in “allowing aliases to override builtins to support default options”
  1. Jay SoffianMar 6, 2009
  2. Sverre RabbelierMar 6, 2009
  3. Junio C HamanoMar 6, 2009
  4. Jay SoffianMar 6, 2009
  5. Johannes SchindelinMar 7, 2009
  6. Jay SoffianMar 7, 2009
  7. Johannes SchindelinMar 7, 2009

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.