libgit2

git_oid_nfmt

Version:

Format a git_oid into a partial hex string.

Signature

int git_oid_nfmt(char *out, size_t n, const git_oid *id);

Parameters

char *
In
out

output hex string; you say how many bytes to write. If the number of bytes is > GIT_OID_HEXSZ, extra bytes will be zeroed; if not, a '
0' terminator is NOT added.

size_t
In
n

number of characters to write into out string

In
id

oid structure to format.

Returns

int

0 on success or error code

Versions