summaryrefslogtreecommitdiff
path: root/commit.c
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 /commit.c
parentbd52ea343d2af91574fedcf765250f44f3d624d4 (diff)
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 'commit.c')
-rw-r--r--commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commit.c b/commit.c
index 1d30f8ce15..aa65183d8b 100644
--- a/commit.c
+++ b/commit.c
@@ -1706,7 +1706,7 @@ int commit_tree_extended(const char *msg, size_t msg_len,
/* Not having i18n.commitencoding is the same as having utf-8 */
encoding_is_utf8 = is_encoding_utf8(git_commit_encoding);
- assert_oid_type(tree, OBJ_TREE);
+ odb_assert_oid_type(the_repository->objects, tree, OBJ_TREE);
if (memchr(msg, '\0', msg_len))
return error("a NUL byte in commit log message not allowed.");