]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/repack: avoid "the_hash_algo" in `repack_promisor_objects()`
authorTaylor Blau <me@ttaylorr.com>
Wed, 15 Oct 2025 22:27:38 +0000 (18:27 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Oct 2025 17:08:53 +0000 (10:08 -0700)
In a similar spirit as the previous commits, avoid referring directly to
"the_hash_algo" within builtin/repack.c::repack_promisor_objects().

Since there is already a repository pointer in scope, use its hash_algo
value instead.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/repack.c

index 7d62959dc28672bbcd576515b34b5c6037486943..a7e94ed03c3a323a419fe60bd957b1fc7fbdc0f7 100644 (file)
@@ -452,7 +452,7 @@ static void repack_promisor_objects(struct repository *repo,
                struct string_list_item *item;
                char *promisor_name;
 
-               if (line.len != the_hash_algo->hexsz)
+               if (line.len != repo->hash_algo->hexsz)
                        die(_("repack: Expecting full hex object ID lines only from pack-objects."));
                item = string_list_append(names, line.buf);