Skip to content

Commit cf688cc

Browse files
rctaygitster
authored andcommitted
http-backend: use end_url_with_slash()
Signed-off-by: Tay Ray Chuan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3793a30 commit cf688cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

http-backend.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,7 @@ static char* getdir(void)
510510
die("GIT_PROJECT_ROOT is set but PATH_INFO is not");
511511
if (daemon_avoid_alias(pathinfo))
512512
die("'%s': aliased", pathinfo);
513-
strbuf_addstr(&buf, root);
514-
if (buf.buf[buf.len - 1] != '/')
515-
strbuf_addch(&buf, '/');
513+
end_url_with_slash(&buf, root);
516514
if (pathinfo[0] == '/')
517515
pathinfo++;
518516
strbuf_addstr(&buf, pathinfo);

0 commit comments

Comments
 (0)