git-2.22.0/exec-cmd.c
/* Returns the highest-priority location to look for git programs. */
Returns the highest-priority location to look for git programs.
Returns the highest - priority location to look for git programs .
const char *git_exec_path(void)
{
	if (!exec_path_value) {
		const char *env = getenv(EXEC_PATH_ENVIRONMENT);
		if (env && *env)
			exec_path_value = xstrdup(env);
		else
			exec_path_value = system_path(GIT_EXEC_PATH);
	}
	return exec_path_value;
}
const char * git_exec_path ( void ) { if ( ! exec_path_value ) { const char * env = getenv ( EXEC_PATH_ENVIRONMENT ) ; if ( env && * env ) exec_path_value = xstrdup ( env ) ; else exec_path_value = system_path ( GIT_EXEC_PATH ) ; } return exec_path_value ; }
Returns the highest-priority location to look for git programs.
Returns the highest - priority location to look for git programs .