summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb.c b/src/odb.c
index 20a3f6c6e..6e8ce3d1d 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -778,7 +778,7 @@ int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id)
}
if (error && error != GIT_PASSTHROUGH) {
- if (!reads)
+ if (!reads || error == GIT_ENOTFOUND)
return git_odb__error_notfound("no match for id", id);
return error;
}