summaryrefslogtreecommitdiff
path: root/http-backend.c
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-11-25 16:21:06 +0800
committerJunio C Hamano <gitster@pobox.com>2010-11-26 14:50:45 -0800
commitcf688cc27329c478eb9ec9be56144198e4a2025a (patch)
tree4a390a3ee0742b9e812ea5db9d617a809bdef268 /http-backend.c
parent3793a309018eac83de7e4a3d39440d236660665c (diff)
downloadgit-cf688cc27329c478eb9ec9be56144198e4a2025a.tar.gz
http-backend: use end_url_with_slash()
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-backend.c')
-rw-r--r--http-backend.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/http-backend.c b/http-backend.c
index 14c90c2e84..85015048dd 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -510,9 +510,7 @@ static char* getdir(void)
die("GIT_PROJECT_ROOT is set but PATH_INFO is not");
if (daemon_avoid_alias(pathinfo))
die("'%s': aliased", pathinfo);
- strbuf_addstr(&buf, root);
- if (buf.buf[buf.len - 1] != '/')
- strbuf_addch(&buf, '/');
+ end_url_with_slash(&buf, root);
if (pathinfo[0] == '/')
pathinfo++;
strbuf_addstr(&buf, pathinfo);