git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 6/6] odb: document object info fields

From
Patrick Steinhardt <ps@pks.im>
Date
Jul 2, 2026, 12:02 UTC
Message-ID
<20260702-b4-pks-odb-drop-whence-v2-6-b0af7468ad95@pks.im>
In-Reply-To
<20260702-b4-pks-odb-drop-whence-v2-0-b0af7468ad95@pks.im>

Some of the fields in `struct object_info` are undocumented. Add these missing comments.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 odb.h | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/odb.h b/odb.h
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;
 
 	/*
-- 
2.55.0.795.g602f6c329a.dirty
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 25 of 26 in “odb: refactor source-specific information in object info”
  1. 0/6 odb: refactor source-specific information in object infoPatrick Steinhardt, Jun 24, 2026
  2. 1/6 packfile: thread odb_source_packed through packed_object_info()Patrick Steinhardt, Jun 24, 2026
  3. Justin ToblerJun 29, 2026
  4. Patrick SteinhardtJun 30, 2026
  5. 2/6 odb: make backend-specific fields optionalPatrick Steinhardt, Jun 24, 2026
  6. Justin ToblerJun 29, 2026
  7. Patrick SteinhardtJun 30, 2026
  8. 3/6 odb: add `source` field to struct object_info_sourcePatrick Steinhardt, Jun 24, 2026
  9. Justin ToblerJun 29, 2026
  10. Junio C HamanoJun 29, 2026
  11. Patrick SteinhardtJun 30, 2026
  12. Junio C HamanoJun 30, 2026
  13. 4/6 treewide: convert users of `whence` to the new source fieldPatrick Steinhardt, Jun 24, 2026
  14. Justin ToblerJun 29, 2026
  15. 5/6 odb: drop `whence` field from object infoPatrick Steinhardt, Jun 24, 2026
  16. Justin ToblerJun 29, 2026
  17. 6/6 odb: document object info fieldsPatrick Steinhardt, Jun 24, 2026
  18. Junio C HamanoJun 24, 2026
  19. 0/6 odb: refactor source-specific information in object infoPatrick Steinhardt, Jul 2, 2026
  20. 1/6 packfile: thread odb_source_packed through packed_object_info()Patrick Steinhardt, Jul 2, 2026
  21. 2/6 odb: make backend-specific fields optionalPatrick Steinhardt, Jul 2, 2026
  22. 3/6 odb: add `source` field to struct object_info_sourcePatrick Steinhardt, Jul 2, 2026
  23. 4/6 treewide: convert users of `whence` to the new source fieldPatrick Steinhardt, Jul 2, 2026
  24. 5/6 odb: drop `whence` field from object infoPatrick Steinhardt, Jul 2, 2026
  25. 6/6 odb: document object info fieldsPatrick Steinhardt, Jul 2, 2026
  26. Junio C HamanoJul 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.