http: replace hard-coded constant with the_hash_algo

Replace a hard-coded 40 with a reference to the_hash_algo. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Feb 19, 2019 at 00:05 UTC ae041a0f9a8f5bd236441a9384a0119cd5a8f791
1 file changed +1 -1
http.c
+1 -1
@@ -2065,7 +2065,7 @@ int http_fetch_ref(const char *base, struct ref *ref)
2065 url = quote_ref_url(base, ref->name);
2066 if (http_get_strbuf(url, &buffer, &options) == HTTP_OK) {
2067 strbuf_rtrim(&buffer);
2068 - if (buffer.len == 40)
2068 + if (buffer.len == the_hash_algo->hexsz)
2069 ret = get_oid_hex(buffer.buf, &ref->old_oid);
2070 else if (starts_with(buffer.buf, "ref: ")) {
2071 ref->symref = xstrdup(buffer.buf + 5);