mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 16:29:07 +00:00
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:
parent
c4cbb3b16e
commit
983e627d10
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user