diff options
| author | Jeff King <peff@peff.net> | 2025-05-12 14:52:33 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-12 13:06:27 -0700 |
| commit | 4b63963f5d729cb9eb997c8912b7d500ffc53297 (patch) | |
| tree | be36f9aae91093dee649de7c15ddbd5b17947824 /replace-object.h | |
| parent | oidmap: add size function (diff) | |
| download | git-4b63963f5d729cb9eb997c8912b7d500ffc53297.tar.gz git-4b63963f5d729cb9eb997c8912b7d500ffc53297.zip | |
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>
Diffstat (limited to 'replace-object.h')
| -rw-r--r-- | replace-object.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/replace-object.h b/replace-object.h index 4226376534..3052e96a62 100644 --- a/replace-object.h +++ b/replace-object.h @@ -47,7 +47,7 @@ static inline const struct object_id *lookup_replace_object(struct repository *r { if (!replace_refs_enabled(r) || (r->objects->replace_map_initialized && - oidmap_get_size(r->objects->replace_map) == 0)) + oidmap_get_size(&r->objects->replace_map) == 0)) return oid; return do_lookup_replace_object(r, oid); } |
