mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
bd52ea343d
commit
961038856b
3
odb.h
3
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
|
||||
|
||||
Reference in New Issue
Block a user