libgit2

git_oid_fmt

Version:

Format a git_oid into a hex string.

Signature

int git_oid_fmt(char *out, const git_oid *id);

Parameters

char *
In
out

output 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 for SHA1, 64 bytes for SHA256). Only the oid digits are written; a '
0' terminator must be added by the caller if it is required.

In
id

oid structure to format.

Returns

int

0 on success or error code

Versions