odb: document object info fields
Some of the fields in `struct object_info` are undocumented. Add these missing comments. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Jul 2, 2026 at 14:02 UTC
8a7ad23e11de9a1de0d16a3aaddb840be768ab30
1 file changed
+17
-1
odb.h
+17
-1
index c251788d50..a1e222f605 100644
--- a/odb.h
+++ b/odb.h
@@ -283,12 +283,28 @@ struct odb_source_info {
} 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;
/*