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

[PATCH 6/6] odb: drop unneeded headers and forward decls

From
Patrick Steinhardt <ps@pks.im>
Date
Mar 31, 2026, 23:57 UTC
Message-ID
<20260401-pks-odb-cleanups-v1-6-89adba9ada68@pks.im>
In-Reply-To
<20260401-pks-odb-cleanups-v1-0-89adba9ada68@pks.im>

There's a couple of unneeded forward declarations and headers in "odb.h". Drop these.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 odb.h | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/odb.h b/odb.h
index 8d739e118b..3a711f6547 100644
--- a/odb.h
+++ b/odb.h
@@ -1,19 +1,17 @@
 #ifndef ODB_H
 #define ODB_H
 
-#include "hashmap.h"
 #include "object.h"
 #include "oidset.h"
 #include "oidmap.h"
 #include "string-list.h"
 #include "thread-utils.h"
 
-struct oidmap;
-struct oidtree;
+struct cached_object_entry;
+struct packed_git;
+struct repository;
 struct strbuf;
 struct strvec;
-struct repository;
-struct multi_pack_index;
 
 /*
  * Set this to 0 to prevent odb_read_object_info_extended() from fetching missing
@@ -31,10 +29,6 @@ extern int fetch_if_missing;
  */
 char *compute_alternate_path(const char *path, struct strbuf *err);
 
-struct packed_git;
-struct packfile_store;
-struct cached_object_entry;
-
 /*
  * A transaction may be started for an object database prior to writing new
  * objects via odb_transaction_begin(). These objects are not committed until
-- 
2.53.0.1185.g05d4b7b318.dirty
Previous: Patrick Steinhardt
Message 7 of 7 in “odb: small set of cleanups”
  1. 0/6 odb: small set of cleanupsPatrick Steinhardt, Mar 31, 2026
  2. 1/6 CodingGuidelines: document our style for flagsPatrick Steinhardt, Mar 31, 2026
  3. 2/6 treewide: use enum for `odb_for_each_object()` flagsPatrick Steinhardt, Mar 31, 2026
  4. 3/6 odb: rename `odb_write_object()` flagsPatrick Steinhardt, Mar 31, 2026
  5. 4/6 odb: use enum for `odb_write_object` flagsPatrick Steinhardt, Mar 31, 2026
  6. 5/6 odb: rename `odb_has_object()` flagsPatrick Steinhardt, Mar 31, 2026
  7. 6/6 odb: drop unneeded headers and forward declsPatrick Steinhardt, Mar 31, 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.