diff options
Diffstat (limited to 'exec_cmd.c')
-rw-r--r-- | exec_cmd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/exec_cmd.c b/exec_cmd.c index da04efe951..8899e31b3b 100644 --- a/exec_cmd.c +++ b/exec_cmd.c @@ -40,6 +40,16 @@ static const char *builtin_exec_path(void) #endif } +const char *system_path(const char *path) +{ + if (!is_absolute_path(path)) { + struct strbuf d = STRBUF_INIT; + strbuf_addf(&d, "%s/%s", git_exec_path(), path); + path = strbuf_detach(&d, NULL); + } + return path; +} + void git_set_argv_exec_path(const char *exec_path) { argv_exec_path = exec_path; |