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.
This commit is contained in:
Patrick Steinhardt 2017-06-13 11:38:59 +02:00
parent c4cbb3b16e
commit 983e627d10

View File

@ -34,7 +34,7 @@ static int fake_backend__exists(git_odb_backend *backend, const git_oid *oid)
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(