aboutsummaryrefslogtreecommitdiffstats
path: root/odb.h
diff options
context:
space:
mode:
Diffstat (limited to 'odb.h')
-rw-r--r--odb.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/odb.h b/odb.h
index a4a5154fd0..2532c49046 100644
--- a/odb.h
+++ b/odb.h
@@ -372,8 +372,9 @@ enum {
* Returns 1 if the object exists. This function will not lazily fetch objects
* in a partial clone by default.
*/
-int has_object(struct repository *r, const struct object_id *oid,
- unsigned flags);
+int odb_has_object(struct object_database *odb,
+ const struct object_id *oid,
+ unsigned flags);
void odb_assert_oid_type(struct object_database *odb,
const struct object_id *oid, enum object_type expect);
@@ -463,4 +464,11 @@ static inline void *repo_read_object_file(struct repository *r,
return odb_read_object(r->objects, oid, type, size);
}
+static inline int has_object(struct repository *r,
+ const struct object_id *oid,
+ unsigned flags)
+{
+ return odb_has_object(r->objects, oid, flags);
+}
+
#endif /* ODB_H */