Parse a raw object id into a git_oid.
git_oid
The appropriate number of bytes for the given object ID type will be read from the byte array - 20 bytes for SHA1, 32 bytes for SHA256.
oid structure the result is written into.
raw object ID bytes
object id type
0 or an error code