aboutsummaryrefslogtreecommitdiffstats
path: root/odb.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-07-01 14:22:18 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-01 14:46:35 -0700
commit961038856bcd319289a226e29503358123c0a1ba (patch)
tree122cadd3dcdc225f4ab3b57da92cce8c51b25cd3 /odb.h
parentbd52ea343d2af91574fedcf765250f44f3d624d4 (diff)
downloadgit-961038856bcd319289a226e29503358123c0a1ba.tar.gz
odb: get rid of `the_repository` in `assert_oid_type()`
Get rid of our dependency on `the_repository` in `assert_oid_type()` by passing in the object database as a parameter and adjusting all callers. Rename the function to `odb_assert_oid_type()`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb.h')
-rw-r--r--odb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/odb.h b/odb.h
index 941329c694..13f5da45f5 100644
--- a/odb.h
+++ b/odb.h
@@ -302,7 +302,8 @@ enum {
int has_object(struct repository *r, const struct object_id *oid,
unsigned flags);
-void assert_oid_type(const struct object_id *oid, enum object_type expect);
+void odb_assert_oid_type(struct object_database *odb,
+ const struct object_id *oid, enum object_type expect);
/*
* Enabling the object read lock allows multiple threads to safely call the