Merge pull request #4264 from libgit2/ethomson/read_prefix

odb_read_prefix: reset error in backends loop
This commit is contained in:
Patrick Steinhardt 2017-06-12 07:33:41 -07:00 committed by GitHub
commit 2ade8fb038

View File

@ -1116,8 +1116,11 @@ static int read_prefix_1(git_odb_object **out, git_odb *db,
if (b->read_prefix != NULL) {
git_oid full_oid;
error = b->read_prefix(&full_oid, &raw.data, &raw.len, &raw.type, b, key, len);
if (error == GIT_ENOTFOUND || error == GIT_PASSTHROUGH)
if (error == GIT_ENOTFOUND || error == GIT_PASSTHROUGH) {
error = 0;
continue;
}
if (error)
goto out;