]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sha1-file.c
submodule: make zero-oid comparison hash function agnostic
[thirdparty/git.git] / sha1-file.c
index cc8a1963498c78ec56171f79c4c1c2d426bd12ba..a4367b8f044c6e9254d2a253149187bdb2be6dd2 100644 (file)
@@ -1317,7 +1317,7 @@ int oid_object_info_extended(struct repository *r, const struct object_id *oid,
                         * TODO Pass a repository struct through fetch_object,
                         * such that arbitrary repositories work.
                         */
-                       fetch_object(repository_format_partial_clone, real->hash);
+                       fetch_objects(repository_format_partial_clone, real, 1);
                        already_retried = 1;
                        continue;
                }
@@ -2213,7 +2213,7 @@ static int check_stream_sha1(git_zstream *stream,
        }
 
        the_hash_algo->final_fn(real_sha1, &c);
-       if (hashcmp(expected_sha1, real_sha1)) {
+       if (!hasheq(expected_sha1, real_sha1)) {
                error(_("sha1 mismatch for %s (expected %s)"), path,
                      sha1_to_hex(expected_sha1));
                return -1;