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

Re: Tiny bug report, interaction between alias and help

From
Jeff King <peff@peff.net>
Date
Jan 22, 2008, 03:43 UTC
Message-ID
<20080122034329.GA1271@coredump.intra.peff.net>
In-Reply-To
<fcaeb9bf0801200159k26303a18ned2eef8e6b5b65d2@mail.gmail.com>
On Sun, Jan 20, 2008 at 04:59:13PM +0700, Nguyen Thai Ngoc Duy wrote:
Show 5 quoted lines
> I've been hit by this and came up with a similar approach as well. But
> I dropped it because it made aliases higher precedence than git-foo
> while git aliases cannot override git-foo (builtin or external ones).
> Is there any other way to make "git-help" respect git command
> executing order?

Yes, and that is an issue in my refactored patch as well. The tricky thing is that usually we say "try git-foo as a real git command, and then fall back to aliases" but we can't here, because "try git-foo" involves exec'ing something else.

It should be possible to do a lookup on "git-foo" and find out if it is a real git command, but I don't know how involved that will be. I'll look at it before I resend post-1.5.4.

And of course the other option is "so what?" People with alias.commit set will get the alias text rather than the man page. But they will quickly figure out that alias.commit doesn't actually _work_, and presumably remove it.

-Peff
Previous: Johannes Schindelin
Message 7 of 7 in “Tiny bug report, interaction between alias and help”
  1. François PinardJan 19, 2008
  2. Pascal ObryJan 19, 2008
  3. Jeff KingJan 19, 2008
  4. Johannes SchindelinJan 19, 2008
  5. Jeff KingJan 19, 2008
  6. Johannes SchindelinJan 19, 2008
  7. Jeff KingJan 22, 2008

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.