Merge branch 'js/maint-1.6.0-exec-path-env'
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2009 07:27:03 +0000 (00:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2009 07:27:03 +0000 (00:27 -0700)
* js/maint-1.6.0-exec-path-env:
  Propagate --exec-path setting to external commands via GIT_EXEC_PATH

exec_cmd.c

index 217c125..408e4e5 100644 (file)
@@ -61,6 +61,10 @@ const char *git_extract_argv0_path(const char *argv0)
 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);
 }