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

packObjectsHook and the git executable

From
Bryan Turner <bturner@atlassian.com>
Date
Jan 30, 2020, 01:00 UTC
Message-ID
<CAGyf7-E==gzsvP-ckK0kwHD+f9pMmLBVpL4y2rC9tqk7ZiuW1g@mail.gmail.com>

In upload-pack.c, when Git invokes the packObjectsHook, it's hard-coded to pass "git". Unless it modifies the PATH environment variable, though, if the script were to invoke the provided command line as-is, it may end up running a different version of Git than the version being used to run upload-pack (or http-backend).

Is there any way the packObjectsHook could be passed the "right" git executable? Or am I missing some surrounding context that means executing "git" is somehow guaranteed to invoke the "right" binary? (Perhaps this same PATH-related caveat applies to other places where Git invokes itself recursively?)

Grateful for any insight! Bryan

Next: Jeff King
Message 1 of 4 in “packObjectsHook and the git executable”
  1. Bryan TurnerJan 30, 2020
  2. Jeff KingJan 30, 2020
  3. Bryan TurnerJan 30, 2020
  4. Jeff KingJan 30, 2020

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.