Returns the highest-priority location to look for git programs. */
| 311 | |
| 312 | /* Returns the highest-priority location to look for git programs. */ |
| 313 | const 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 | |
| 325 | static void add_path(struct strbuf *out, const char *path) |
| 326 | { |
no test coverage detected