summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-19 06:33:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-19 06:33:16 (GMT)
commit9ebfda109eeb69e8f313ffa7fb85bdba0f16e405 (patch)
tree55a8aceb5fe297dddc78cfa536e4e5858615edcf /http.c
parent09ba7b2d9fc9142a2195082dd0e74c8161b6b744 (diff)
parent800324c3addbf60b15114c4292204806b1300060 (diff)
downloadgit-9ebfda109eeb69e8f313ffa7fb85bdba0f16e405.zip
git-9ebfda109eeb69e8f313ffa7fb85bdba0f16e405.tar.gz
git-9ebfda109eeb69e8f313ffa7fb85bdba0f16e405.tar.bz2
Merge branch 'rc/maint-http-fix'
* rc/maint-http-fix: http.c: don't assume that urls don't end with slash
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/http.c b/http.c
index 14d5357..eb0c669 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);
}