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

Re: Allow git alias to override existing Git commands

From
Stefan Beller <sbeller@google.com>
Date
Nov 10, 2015, 20:22 UTC
Message-ID
<CAGZ79kZ9zw+Lf4P7EFxZ6Q7PK7GrTFZokPgtEJ-Gcdp3pHkurA@mail.gmail.com>
In-Reply-To
<56424DDE.2030808@game-point.net>
On Tue, Nov 10, 2015 at 12:04 PM, Jeremy Morton <admin@game-point.net> wrote:
Show 20 quoted lines
> On 10/11/2015 18:12, Stefan Beller wrote:
>>
>> On Tue, Nov 10, 2015 at 8:31 AM, Jeremy Morton<admin@game-point.net>
>> wrote:
>>>
>>> It's recently come to my attention that the "git alias" config
>>> functionality
>>> ignores all aliases that would override existing Git commands.  This
>>> seems
>>> like a bad idea to me.
>>
>>
>> This ensures that the plumbing commands always work as expected.
>> As scripts *should* only use plumbing commands, the scripts should
>> work with high probability despite all the crazy user
>> configuration/aliases.
>>
>
> I just disagree with this.  If a user chooses to override their Git
> commands, it's their problem.  Why should Git care about this?

Because we still have some Git commands (i.e. git submodule) as scripts, which would break if the user aliases plumbing commands. This is unexpected, so should be avoided. Maybe we could allow aliasing porcelain commands though, but that is extra effort, which nobody looked into yet.

> It should
> provide the user with the option to do this, and if the user ruins scripts
> because of their aliases, it is not Git's problem.  What you are doing is
> taking away power from users to use git aliases to their full potential.
Yeah, no user asked for that power I guess, you're the first. :)

As from your initial email, I think before trying to overriding 'clone' to 'clone --recurse' you'd rather want to have a globally configured option to recurse by default on invocation of 'clone'. That sounds saner to me at least.

Stefan
Previous: Jeremy MortonNext: Sitaram Chamarty
Message 4 of 13 in “Allow git alias to override existing Git commands”
  1. Jeremy MortonNov 10, 2015
  2. Stefan BellerNov 10, 2015
  3. Jeremy MortonNov 10, 2015
  4. Stefan BellerNov 10, 2015
  5. Sitaram ChamartyNov 11, 2015
  6. Jeremy MortonNov 11, 2015
  7. Sitaram ChamartyNov 11, 2015
  8. Jeremy MortonNov 11, 2015
  9. Sitaram ChamartyNov 11, 2015
  10. Stefan BellerNov 11, 2015
  11. Jens LehmannNov 10, 2015
  12. Stefan BellerNov 10, 2015
  13. Jens LehmannNov 11, 2015

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.