]> git.ipfire.org Git - thirdparty/git.git/commitdiff
object-file: get rid of `the_repository` in `loose_object_info()`
authorPatrick Steinhardt <ps@pks.im>
Thu, 17 Jul 2025 04:56:32 +0000 (06:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Jul 2025 05:16:14 +0000 (22:16 -0700)
While `loose_object_info()` already accepts a repository as parameter we
still have one callsite in there where we use `the_repository` to figure
out the hash algorithm. Use the passed-in repository instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object-file.c

index 3453989b7e321e32dd159b82c3dd92b67b187cda..800eeae85af1ededb06f4c8117087c03978a7903 100644 (file)
@@ -421,7 +421,7 @@ int loose_object_info(struct repository *r,
        enum object_type type_scratch;
 
        if (oi->delta_base_oid)
-               oidclr(oi->delta_base_oid, the_repository->hash_algo);
+               oidclr(oi->delta_base_oid, r->hash_algo);
 
        /*
         * If we don't care about type or size, then we don't