libgit2

git_oid_strcmp

Version:

Compare an oid to an hex formatted object id.

Signature

int git_oid_strcmp(const git_oid *id, const char *str);

Parameters

In
id

oid structure.

const char *
In
str

input hex string of an object id.

Returns

int

-1 if str is not valid, < 0 if id sorts before str, 0 if id matches str, >0 if id sorts after str.

Versions