From 59e8a22602709e8e84ef93ba2145f85e4bbfdf6c Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 24 Jun 2026 14:19:19 +0200 Subject: [PATCH] odb: document object info fields Some of the fields in `struct object_info` are undocumented. Add these missing comments. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- odb.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/odb.h b/odb.h index e0d05eaf87..a44ec46b08 100644 --- a/odb.h +++ b/odb.h @@ -283,12 +283,28 @@ struct object_info_source { } u; }; +/* + * The object info contains the query and response that is to be used for + * functions that end up reading object information. Callers are expected to + * populate pointers whose information they want to request. + */ struct object_info { - /* Request */ + /* The object type. */ enum object_type *typep; + + /* The inflated object size in bytes. */ size_t *sizep; + + /* The object size as stored on disk. */ off_t *disk_sizep; + + /* + * The base the object is deltified against, in case it is stored as a + * delta. + */ struct object_id *delta_base_oid; + + /* The object contents. Ownership of memory goes over to the caller. */ void **contentp; /* -- 2.47.3