From cf688cc27329c478eb9ec9be56144198e4a2025a Mon Sep 17 00:00:00 2001 From: Tay Ray Chuan Date: Thu, 25 Nov 2010 16:21:06 +0800 Subject: [PATCH] http-backend: use end_url_with_slash() Signed-off-by: Tay Ray Chuan Signed-off-by: Junio C Hamano --- http-backend.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); -- 2.30.2