Parse the given number of characters out of a hex formatted object id
string into a git_oid.
The given length can be between 0 and the hex size for the given object ID
type - 40 characters for SHA1, 64 characters for SHA256. The remainder of
the git_oid will be set to zeros.
input hex prefix
the length of the given prefix
0 or an error code