use strbuf_add_absolute_path() to add absolute paths

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2014-07-28 20:34:42 +02:00 committed by Junio C Hamano
parent 679eebe24d
commit 9610decf4d

View File

@ -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);
}
}