From 961038856bcd319289a226e29503358123c0a1ba Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 1 Jul 2025 14:22:18 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/commit-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/commit-tree.c') diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c index 546069f868..31cfd9bd15 100644 --- a/builtin/commit-tree.c +++ b/builtin/commit-tree.c @@ -48,7 +48,7 @@ static int parse_parent_arg_callback(const struct option *opt, if (repo_get_oid_commit(the_repository, arg, &oid)) die(_("not a valid object name %s"), arg); - assert_oid_type(&oid, OBJ_COMMIT); + odb_assert_oid_type(the_repository->objects, &oid, OBJ_COMMIT); new_parent(lookup_commit(the_repository, &oid), parents); return 0; } -- cgit v1.2.3