t/t7406-submodule-update.sh: use the $( ... ) construct for command substitution
[gitweb.git] / http.c
diff --git a/http.c b/http.c
index 553d85674acac02856eac0fa19cf880993405e1b..0da9e6639832a493f932e3ba332683d3d4ae73ae 100644 (file)
--- a/http.c
+++ b/http.c
@@ -1402,7 +1402,7 @@ int http_fetch_ref(const char *base, struct ref *ref)
        if (http_get_strbuf(url, &buffer, &options) == HTTP_OK) {
                strbuf_rtrim(&buffer);
                if (buffer.len == 40)
-                       ret = get_sha1_hex(buffer.buf, ref->old_sha1);
+                       ret = get_oid_hex(buffer.buf, &ref->old_oid);
                else if (starts_with(buffer.buf, "ref: ")) {
                        ref->symref = xstrdup(buffer.buf + 5);
                        ret = 0;
@@ -1628,8 +1628,8 @@ struct http_pack_request *new_http_pack_request(
        if (prev_posn>0) {
                if (http_is_verbose)
                        fprintf(stderr,
-                               "Resuming fetch of pack %s at byte %ld\n",
-                               sha1_to_hex(target->sha1), prev_posn);
+                               "Resuming fetch of pack %s at byte %"PRIuMAX"\n",
+                               sha1_to_hex(target->sha1), (uintmax_t)prev_posn);
                http_opt_request_remainder(preq->slot->curl, prev_posn);
        }
 
@@ -1783,8 +1783,8 @@ struct http_object_request *new_http_object_request(const char *base_url,
        if (prev_posn>0) {
                if (http_is_verbose)
                        fprintf(stderr,
-                               "Resuming fetch of object %s at byte %ld\n",
-                               hex, prev_posn);
+                               "Resuming fetch of object %s at byte %"PRIuMAX"\n",
+                               hex, (uintmax_t)prev_posn);
                http_opt_request_remainder(freq->slot->curl, prev_posn);
        }