Skip to content

Commit

Permalink
http-backend: use end_url_with_slash()
Browse files Browse the repository at this point in the history
Signed-off-by: Tay Ray Chuan <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
rctay authored and gitster committed Nov 26, 2010
1 parent 3793a30 commit cf688cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions http-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cf688cc

Please sign in to comment.