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

[PATCH] receive-pack: Initialize PATH to include exec-dir.

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Mar 3, 2008, 04:08 UTC
Message-ID
<20080303040843.GA27185@atjola.homenet>

511707d (use only the $PATH for exec'ing git commands) made it a requirement to call setup_path() to include the git exec-dir in PATH before spawning any other git commands. git-receive-pack was not yet adapted to do this and therefore fails to spawn git-unpack-objects if that is not in the standard PATH.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
---
 receive-pack.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/receive-pack.c b/receive-pack.c
index a971433..f83ae87 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -471,6 +471,8 @@ int main(int argc, char **argv)
 	if (!dir)
 		usage(receive_pack_usage);
 
+	setup_path(NULL);
+
 	if (!enter_repo(dir, 0))
 		die("'%s': unable to chdir or not a git archive", dir);
 
-- 
1.5.4.3.1.g3b5b4
Next: Bernt Hansen
Message 1 of 3 in “receive-pack: Initialize PATH to include exec-dir.”
  1. receive-pack: Initialize PATH to include exec-dir.Björn Steinbrink, Mar 3, 2008
  2. Bernt HansenMar 3, 2008
  3. Junio C HamanoMar 3, 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.