X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=exec_cmd.c;h=8899e31b3b9edb528a339df394f891f76b8de594;hb=65360346309a550185363ef5b846a1202175a4e6;hp=da04efe951e5b8dc4e7b72246212d8ebabc09ec6;hpb=5f2f71f6af0fc66cf4c590a1806ee18b197e086e;p=git.git diff --git a/exec_cmd.c b/exec_cmd.c index da04efe95..8899e31b3 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;