summaryrefslogtreecommitdiff
path: root/src/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/object.h')
-rw-r--r--src/object.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/object.h b/src/object.h
index 13edf3118..dd227d16d 100644
--- a/src/object.h
+++ b/src/object.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_object_h__
#define INCLUDE_object_h__
+#include "repository.h"
+
extern bool git_object__strict_input_validation;
/** Base git object for inheritance */
@@ -30,21 +32,8 @@ int git_oid__parse(git_oid *oid, const char **buffer_out, const char *buffer_end
void git_oid__writebuf(git_buf *buf, const char *header, const git_oid *oid);
-GIT_INLINE(bool) git_object__is_valid(
- git_repository *repo, const git_oid *id, git_otype type)
-{
- git_object *obj = NULL;
- bool valid = true;
-
- if (git_object__strict_input_validation) {
- if (git_object_lookup(&obj, repo, id, type) < 0)
- valid = false;
-
- git_object_free(obj);
- }
-
- return valid;
-}
+bool git_object__is_valid(
+ git_repository *repo, const git_oid *id, git_otype expected_type);
GIT_INLINE(git_otype) git_object__type_from_filemode(git_filemode_t mode)
{