Parse a hex formatted object id into a git_oid.
oid structure the result is written into.
input hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (40 bytes).
GIT_SUCCESS or an error code