diff --git a/exec_cmd.c b/exec_cmd.c index 125fa6fab..698e7526c 100644 --- a/exec_cmd.c +++ b/exec_cmd.c @@ -86,11 +86,7 @@ const char *git_exec_path(void) static void add_path(struct strbuf *out, const char *path) { if (path && *path) { - if (is_absolute_path(path)) - strbuf_addstr(out, path); - else - strbuf_addstr(out, absolute_path(path)); - + strbuf_add_absolute_path(out, path); strbuf_addch(out, PATH_SEP); } }