Commit 983e627d by Patrick Steinhardt

tests: odb: use correct OID length

The `search_object` function takes the OID length as one of its
parameters, where its maximum length is `GIT_OID_HEXSZ`. The `exists`
function of the fake backend used `GIT_OID_RAWSZ` though, leading to
only the first half of the OID being used when finding the correct
object.
parent c4cbb3b1
...@@ -34,7 +34,7 @@ static int fake_backend__exists(git_odb_backend *backend, const git_oid *oid) ...@@ -34,7 +34,7 @@ static int fake_backend__exists(git_odb_backend *backend, const git_oid *oid)
fake->exists_calls++; fake->exists_calls++;
return search_object(NULL, fake, oid, GIT_OID_RAWSZ) == GIT_OK; return search_object(NULL, fake, oid, GIT_OID_HEXSZ) == GIT_OK;
} }
static int fake_backend__read( static int fake_backend__read(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment