summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-11-25 08:21:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-11-26 22:50:45 (GMT)
commitcf688cc27329c478eb9ec9be56144198e4a2025a (patch)
tree4a390a3ee0742b9e812ea5db9d617a809bdef268
parent3793a309018eac83de7e4a3d39440d236660665c (diff)
downloadgit-cf688cc27329c478eb9ec9be56144198e4a2025a.zip
git-cf688cc27329c478eb9ec9be56144198e4a2025a.tar.gz
git-cf688cc27329c478eb9ec9be56144198e4a2025a.tar.bz2
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>
-rw-r--r--http-backend.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/http-backend.c b/http-backend.c
index 14c90c2..8501504 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);