From 4b63963f5d729cb9eb997c8912b7d500ffc53297 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 12 May 2025 14:52:33 -0400 Subject: raw_object_store: drop extra pointer to replace_map We store the replacement data in an oidmap, which is itself a pointer in the raw_object_store struct. But there's no need for an extra pointer indirection here. It is always allocated and initialized along with the containing struct, and we never check it for NULL-ness. Let's embed the map directly in the struct, which is simpler and avoids extra pointer chasing. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- commit-graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commit-graph.c') diff --git a/commit-graph.c b/commit-graph.c index 1a74e1e1ba..4a6e34f8a0 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -222,7 +222,7 @@ static int commit_graph_compatible(struct repository *r) if (replace_refs_enabled(r)) { prepare_replace_object(r); - if (oidmap_get_size(r->objects->replace_map)) + if (oidmap_get_size(&r->objects->replace_map)) return 0; } -- cgit 1.2.3-korg