libgit2

git_oid_fromstr

Version:

Parse a hex formatted object id into a git_oid.

Signature

int git_oid_fromstr(git_oid *out, const char *str);

Parameters

In
out

oid structure the result is written into.

const char *
In
str

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).

Returns

int

GIT_SUCCESS or an error code

Versions