git.c: execution path
The comment before executing git subcommands were stale and confusing. Noticed by Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jul 31, 2007 at 02:06 UTC
cf32190aa6966dea519e77cdcc80b87026beb3b4
1 file changed
+5
-5
git.c
+5
-5
@@ -443,11 +443,11 @@ int main(int argc, const char **argv)
443
cmd = argv[0];
444
445
/*
446
- * We search for git commands in the following order:
447
- * - git_exec_path()
448
- * - the path of the "git" command if we could find it
449
- * in $0
450
- * - the regular PATH.
446
+ * We execute external git command via execv_git_cmd(),
447
+ * which looks at "--exec-path" option, GIT_EXEC_PATH
448
+ * environment, and $(gitexecdir) in Makefile while built,
449
+ * in this order. For scripted commands, we prepend
450
+ * the value of the exec_path variable to the PATH.
451
*/
452
if (exec_path)
453
prepend_to_path(exec_path, strlen(exec_path));