Skip to content

Commit 2ade8fb

Browse files
authored
Merge pull request libgit2#4264 from libgit2/ethomson/read_prefix
odb_read_prefix: reset error in backends loop
2 parents bd69280 + cb3010c commit 2ade8fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/odb.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,8 +1116,11 @@ static int read_prefix_1(git_odb_object **out, git_odb *db,
11161116
if (b->read_prefix != NULL) {
11171117
git_oid full_oid;
11181118
error = b->read_prefix(&full_oid, &raw.data, &raw.len, &raw.type, b, key, len);
1119-
if (error == GIT_ENOTFOUND || error == GIT_PASSTHROUGH)
1119+
1120+
if (error == GIT_ENOTFOUND || error == GIT_PASSTHROUGH) {
1121+
error = 0;
11201122
continue;
1123+
}
11211124

11221125
if (error)
11231126
goto out;

0 commit comments

Comments
 (0)