Skip to content

Commit 9610dec

Browse files
rscharfegitster
authored andcommitted
use strbuf_add_absolute_path() to add absolute paths
Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 679eebe commit 9610dec

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

exec_cmd.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ const char *git_exec_path(void)
8686
static void add_path(struct strbuf *out, const char *path)
8787
{
8888
if (path && *path) {
89-
if (is_absolute_path(path))
90-
strbuf_addstr(out, path);
91-
else
92-
strbuf_addstr(out, absolute_path(path));
93-
89+
strbuf_add_absolute_path(out, path);
9490
strbuf_addch(out, PATH_SEP);
9591
}
9692
}

0 commit comments

Comments
 (0)