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

Re: Quick merge status updates.

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 3, 2006, 00:00 UTC
Message-ID
<Pine.LNX.4.64.0607021655440.12404@g5.osdl.org>
In-Reply-To
<7vejx31sav.fsf@assigned-by-dhcp.cox.net>
On Sun, 2 Jul 2006, Junio C Hamano wrote:
> Yuck; that means we would need to have something evil like this.
That's just disgusting.
How about a _much_ simpler approach.
Just make it do
	BEGIN { push ENV{'GIT_PERL_EXEC_DIR'}; }
And then simply _require_ that the setup code sets up GIT_PERL_EXEC_DIR.

Which is usually simple enough to do. For git.c, something like this will do it, other places you can reach things through can have something similar.

		Linus
---
diff --git a/git.c b/git.c
index ca8961f..e8f25ee 100644
--- a/git.c
+++ b/git.c
@@ -294,6 +294,7 @@ int main(int argc, const char **argv, ch
 		prepend_to_path(exec_path, strlen(exec_path));
 	exec_path = git_exec_path();
 	prepend_to_path(exec_path, strlen(exec_path));
+	setenv(exec_path, "GIT_PERL_EXEC_DIR", 0);
 
 	while (1) {
 		/* See if it's an internal command */
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 21 in “Quick merge status updates.”
  1. Junio C HamanoJun 28, 2006
  2. Pavel RoskinJun 28, 2006
  3. Junio C HamanoJun 28, 2006
  4. Pavel RoskinJun 28, 2006
  5. Junio C HamanoJun 28, 2006
  6. Petr BaudisJul 2, 2006
  7. Junio C HamanoJul 2, 2006
  8. Petr BaudisJul 2, 2006
  9. Junio C HamanoJul 2, 2006
  10. Junio C HamanoJul 2, 2006
  11. Linus TorvaldsJul 3, 2006
  12. Junio C HamanoJul 3, 2006
  13. Pavel RoskinJul 8, 2006
  14. Johannes SchindelinJun 28, 2006
  15. Johannes SchindelinJun 28, 2006
  16. Junio C HamanoJun 28, 2006
  17. Johannes SchindelinJun 28, 2006
  18. Git.pm: Avoid ppport.hPetr Baudis, Jul 1, 2006
  19. Johannes SchindelinJul 2, 2006
  20. Junio C HamanoJul 2, 2006
  21. Git.pm: Don't #define around diePetr Baudis, Jul 2, 2006

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.