summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/odb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb.c b/src/odb.c
index bf5ad7ca4..fc07a1716 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1835,7 +1835,7 @@ int git_odb_exists(git_odb *db, const git_oid *id)
{
obj_location loc;
assert(db && id);
- return locate_object(&loc, db, id) == OBJ_LOCATION_NOTFOUND ? 0 : 1;
+ return locate_object(&loc, db, id) != OBJ_LOCATION_NOTFOUND;
}
int git_odb_read_header(git_rawobj *out, git_odb *db, const git_oid *id)