Thread (158 messages) 158 messages, 3 authors, 2025-10-16
STALE279d

[PATCH 08/49] builtin/repack: avoid "the_hash_algo" in `repack_promisor_objects()`

From: Taylor Blau <hidden>
Date: 2025-09-28 22:07:44
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 builtin/repack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/repack.c b/builtin/repack.c
index 7d62959dc2..a7e94ed03c 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -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);
 
-- 
2.51.0.243.g16eca91f2c0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help