Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'js/maint-1.6.0-exec-path-env' into maint-1.6.1
author
Junio C Hamano
<gitster@pobox.com>
Thu, 9 Apr 2009 06:01:10 +0000
(23:01 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 9 Apr 2009 06:01:10 +0000
(23:01 -0700)
* js/maint-1.6.0-exec-path-env:
Propagate --exec-path setting to external commands via GIT_EXEC_PATH
1
2
exec_cmd.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
compact
(merge:
5b841d6
c90d565
)
diff --combined
exec_cmd.c
index cdd35f91954bdc751455e1083a0612a21eeadc67,589059f026bcecae99469c4514efdcfa9542e28b..351fec2e9e374eacaeba88d2a7dddf11f5e331ce
---
1
/
exec_cmd.c
---
2
/
exec_cmd.c
+++ b/
exec_cmd.c
@@@
-25,6
-25,10
+25,10
@@@
void git_set_argv0_path(const char *pat
void git_set_argv_exec_path(const char *exec_path)
{
argv_exec_path = exec_path;
+ /*
+ * Propagate this setting to external programs.
+ */
+ setenv(EXEC_PATH_ENVIRONMENT, exec_path, 1);
}
@@@
-59,7
-63,9
+63,7
@@@
static void add_path(struct strbuf *out
void setup_path(void)
{
const char *old_path = getenv("PATH");
- struct strbuf new_path;
-
- strbuf_init(&new_path, 0);
+ struct strbuf new_path = STRBUF_INIT;
add_path(&new_path, argv_exec_path);
add_path(&new_path, getenv(EXEC_PATH_ENVIRONMENT));