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

Re: git silently ignores aliases of existing commands

From
Ddemerphq <demerphq@gmail.com>
Date
Jul 18, 2009, 10:55 UTC
Message-ID
<9b18b3110907180355s5bf08f8did180caa0c55b3389@mail.gmail.com>
In-Reply-To
<20090718104631.GA27307@coredump.intra.peff.net>
2009/7/18 Jeff King <peff@peff.net>:
Show 22 quoted lines
> On Sat, Jul 18, 2009 at 11:30:25AM +0200, demerphq wrote:
>
>> Yeah it seems reasonable that if its going to be ignored it should not
>> be silently ignored.
>
> I agree that there should be a warning. However, it's hard to do with
> the code structured as it is now; we don't know that a command exists
> as an external command until we try to exec it. And if it succeeds, we
> don't get to execute any more code.
>
> It's certainly possible, but sadly it is more surgery than just
>
>  if (alias_lookup(cmd))
>    warn("you also have an alias defined");
>
>> Especially given that the silentness effectively means there cant be
>> any new git tools added without possible breakage of installed setups.
>
> The silentness makes it harder to diagnose problems, but even with a
> warning, we can break things by creating new commands. If you have an
> alias "foo" and we ship "git-foo" in a newer version of git, your alias
> will just stop working.

That was my point. At least if there were warnings about this the risk would be mitigated.

cheers, Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
Previous: Jeff KingNext: Jeff King
Message 6 of 9 in “git silently ignores aliases of existing commands”
  1. Michael G SchwernJul 18, 2009
  2. Sean EstabrooksJul 18, 2009
  3. Michael G SchwernJul 18, 2009
  4. demerphqJul 18, 2009
  5. Jeff KingJul 18, 2009
  6. demerphqJul 18, 2009
  7. Jeff KingJul 18, 2009
  8. demerphqJul 18, 2009
  9. A Large Angry SCMJul 18, 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.