Parse a hex formatted null-terminated string into a git_oid.
oid structure the result is written into.
input hex string; must be at least 4 characters long and null-terminated.
0 or an error code