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

Re: Git fails to detect subcommand when hook is symlinked to a builtin

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 19, 2011, 19:40 UTC
Message-ID
<7voc56rj9f.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110319011445.GL26236@inocybe.localdomain>
Todd Zullinger <tmz@pobox.com> writes:
Show 7 quoted lines
>> I suspect the recent change to run hooks via run_command() interface
>> has something to do with it.  From what version did you update to
>> 1.7.4.1?
>
> I should have mentioned it, but I failed to do so.  Sorry about that.
>
> This was moving from 1.5.5.6 to 1.7.4.1.

Ok, that explains it. update-server-info wasn't a built-in, so didn't have to look at its name to decide what to do. It didn't have to spawn other git commands from GIT_EXEC_PATH so running the command directly without setting the environment variable happened to work.

But such a usage (this doesn't have anything to do with the symlinking) was deprecated way before 1.5.4 [*1*], so the answer is still "don't do that" ;-)

Thanks for a clarification.
[Reference]
*1* http://thread.gmane.org/gmane.comp.version-control.git/93511
Previous: Todd ZullingerNext: Jonathan Nieder
Message 4 of 6 in “Git fails to detect subcommand when hook is symlinked to a builtin”
  1. Todd ZullingerMar 18, 2011
  2. Junio C HamanoMar 19, 2011
  3. Todd ZullingerMar 19, 2011
  4. Junio C HamanoMar 19, 2011
  5. Jonathan NiederMar 20, 2011
  6. Jonathan NiederMar 20, 2011

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.