| 331 | } |
| 332 | |
| 333 | void setup_path(void) |
| 334 | { |
| 335 | const char *exec_path = git_exec_path(); |
| 336 | const char *old_path = getenv("PATH"); |
| 337 | struct strbuf new_path = STRBUF_INIT; |
| 338 | |
| 339 | git_set_exec_path(exec_path); |
| 340 | add_path(&new_path, exec_path); |
| 341 | |
| 342 | if (old_path) |
| 343 | strbuf_addstr(&new_path, old_path); |
| 344 | else |
| 345 | strbuf_addstr(&new_path, _PATH_DEFPATH); |
| 346 | |
| 347 | setenv("PATH", new_path.buf, 1); |
| 348 | |
| 349 | strbuf_release(&new_path); |
| 350 | } |
| 351 | |
| 352 | const char **prepare_git_cmd(struct strvec *out, const char **argv) |
| 353 | { |
no test coverage detected