summaryrefslogtreecommitdiff
path: root/exec_cmd.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-07-28 20:34:42 +0200
committerJunio C Hamano <gitster@pobox.com>2014-08-26 11:06:06 -0700
commit9610decf4dc6b9352b81c67e3b03e5bb47fc8427 (patch)
tree979d991153d5ace1ad3d9c5f8846969ef373dd3f /exec_cmd.c
parent679eebe24d4c2120f8c01fb4524fcc489718fc9c (diff)
downloadgit-9610decf4dc6b9352b81c67e3b03e5bb47fc8427.tar.gz
use strbuf_add_absolute_path() to add absolute pathsrs/strbuf-getcwd
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec_cmd.c')
-rw-r--r--exec_cmd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/exec_cmd.c b/exec_cmd.c
index 125fa6fabf..698e7526c4 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);
}
}