summaryrefslogtreecommitdiff
path: root/builtin/commit-tree.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 /builtin/commit-tree.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 'builtin/commit-tree.c')
-rw-r--r--builtin/commit-tree.c2
1 files changed, 1 insertions, 1 deletions
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;
}