aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-28 19:34:16 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-28 19:34:16 -0700
commit48ae73b11487e12f8f7198e18779e65500d4ca0c (patch)
treedd00fb0f7fe8a6d93f3a1b3b47ad44c47f1aab77
parent4b9fa0e359a710b5d8dae542a92df7dbe56d9915 (diff)
parent800324c3addbf60b15114c4292204806b1300060 (diff)
downloadgit-48ae73b11487e12f8f7198e18779e65500d4ca0c.tar.gz
git-48ae73b11487e12f8f7198e18779e65500d4ca0c.tar.xz
Merge branch 'rc/maint-http-fix' into maint
* rc/maint-http-fix: http.c: don't assume that urls don't end with slash
-rw-r--r--http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/http.c b/http.c
index 1ae19e070..d60f7f767 100644
--- a/http.c
+++ b/http.c
@@ -719,7 +719,9 @@ void append_remote_object_url(struct strbuf *buf, const char *url,
const char *hex,
int only_two_digit_prefix)
{
- strbuf_addf(buf, "%s/objects/%.*s/", url, 2, hex);
+ end_url_with_slash(buf, url);
+
+ strbuf_addf(buf, "objects/%.*s/", 2, hex);
if (!only_two_digit_prefix)
strbuf_addf(buf, "%s", hex+2);
}