Parse N characters of a hex formatted object id into a git_oid.
If N is odd, the last byte's high nibble will be read in and the low nibble set to zero.
oid structure the result is written into.
input hex string of at least size length
length
length of the input string
0 or an error code