MCPcopy Index your code
hub / github.com/git/git / git_exec_path

Function git_exec_path

exec-cmd.c:313–323  ·  view source on GitHub ↗

Returns the highest-priority location to look for git programs. */

Source from the content-addressed store, hash-verified

311
312/* Returns the highest-priority location to look for git programs. */
313const char *git_exec_path(void)
314{
315 if (!exec_path_value) {
316 const char *env = getenv(EXEC_PATH_ENVIRONMENT);
317 if (env && *env)
318 exec_path_value = xstrdup(env);
319 else
320 exec_path_value = system_path(GIT_EXEC_PATH);
321 }
322 return exec_path_value;
323}
324
325static void add_path(struct strbuf *out, const char *path)
326{

Callers 8

load_command_listFunction · 0.85
list_commandsFunction · 0.85
setup_pathFunction · 0.85
handle_optionsFunction · 0.85
launchctl_add_plistsFunction · 0.85
schtasks_schedule_tasksFunction · 0.85
crontab_update_scheduleFunction · 0.85

Calls 2

xstrdupFunction · 0.85
system_pathFunction · 0.85

Tested by

no test coverage detected