]> git.ipfire.org Git - thirdparty/git.git/commit
raw_object_store: drop extra pointer to replace_map
authorJeff King <peff@peff.net>
Mon, 12 May 2025 18:52:33 +0000 (14:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 May 2025 20:06:27 +0000 (13:06 -0700)
commit4b63963f5d729cb9eb997c8912b7d500ffc53297
treebe36f9aae91093dee649de7c15ddbd5b17947824
parent596184786c1b1998573df4c130eadb1668d8c304
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c
object-store.c
object-store.h
replace-object.c
replace-object.h