summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 66115d3)
raw | patch | inline | side by side (parent: 66115d3)
author | Mike Hommey <mh@glandium.org> | |
Sat, 14 Jun 2008 10:02:22 +0000 (12:02 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 14 Jun 2008 19:53:09 +0000 (12:53 -0700) |
In c13b263, http_fetch_ref got "refs/" included in the ref passed to it,
which, incidentally, makes the allocation in quote_ref_url too big, now.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
which, incidentally, makes the allocation in quote_ref_url too big, now.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c | patch | blob | history |
index 2a21ccbb76351d108301d2b9c334e2c5a5feacd9..105dc93843ba1f01ea0d40c63dd174e879f1a25a 100644 (file)
--- a/http.c
+++ b/http.c
int len, baselen, ch;
baselen = strlen(base);
- len = baselen + 7; /* "/refs/" + NUL */
+ len = baselen + 2; /* '/' after base and terminating NUL */
for (cp = ref; (ch = *cp) != 0; cp++, len++)
if (needs_quote(ch))
len += 2; /* extra two hex plus replacement % */