Skip to content

Commit cf32190

Browse files
committed
git.c: execution path
The comment before executing git subcommands were stale and confusing. Noticed by Jeff King. Signed-off-by: Junio C Hamano <[email protected]>
1 parent bef19da commit cf32190

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

git.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,11 @@ int main(int argc, const char **argv)
443443
cmd = argv[0];
444444

445445
/*
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.
451451
*/
452452
if (exec_path)
453453
prepend_to_path(exec_path, strlen(exec_path));

0 commit comments

Comments
 (0)