From: Tay Ray Chuan Date: Thu, 25 Nov 2010 08:21:06 +0000 (+0800) Subject: http-backend: use end_url_with_slash() X-Git-Tag: v1.7.3.4~10^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cf688cc27329c478eb9ec9be56144198e4a2025a;p=git.git http-backend: use end_url_with_slash() Signed-off-by: Tay Ray Chuan Signed-off-by: Junio C Hamano --- diff --git a/http-backend.c b/http-backend.c index 14c90c2e8..85015048d 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);