Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: Quick merge status updates.

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:32
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)


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 */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help