]> git.ipfire.org Git - thirdparty/git.git/commitdiff
odb: document object info fields
authorPatrick Steinhardt <ps@pks.im>
Thu, 2 Jul 2026 12:02:04 +0000 (14:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Jul 2026 16:52:32 +0000 (09:52 -0700)
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>
odb.h

diff --git a/odb.h b/odb.h
index c251788d5016aeffce42aa2849077a0925e4c5dd..a1e222f605d5f89e4a91299c2aea150c1b64afe5 100644 (file)
--- 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;
 
        /*