]> git.ipfire.org Git - thirdparty/git.git/blobdiff - http-push.c
Sync with 2.31.8
[thirdparty/git.git] / http-push.c
index 832fcac89f67b8fa82b33faebdec0a905f9ad809..b6db3b9043797a66274b510eb332dfb4675ddf52 100644 (file)
@@ -1022,6 +1022,8 @@ static void remote_ls(const char *path, int flags,
 /* extract hex from sharded "xx/x{38}" filename */
 static int get_oid_hex_from_objpath(const char *path, struct object_id *oid)
 {
+       oid->algo = hash_algo_by_ptr(the_hash_algo);
+
        if (strlen(path) != the_hash_algo->hexsz + 1)
                return -1;
 
@@ -1436,7 +1438,7 @@ static void one_remote_ref(const char *refname)
         * may be required for updating server info later.
         */
        if (repo->can_update_info_refs && !has_object_file(&ref->old_oid)) {
-               obj = lookup_unknown_object(&ref->old_oid);
+               obj = lookup_unknown_object(the_repository, &ref->old_oid);
                fprintf(stderr, "  fetch %s for %s\n",
                        oid_to_hex(&ref->old_oid), refname);
                add_fetch_request(obj);