libgit2

git_oid_shorten_new

Version:

Create a new OID shortener.

The OID shortener is used to process a list of OIDs in text form and return the shortest length that would uniquely identify all of them.

E.g. look at the result of git log --abbrev.

Signature

git_oid_shorten *git_oid_shorten_new(size_t min_length);

Parameters

size_t
In
min_length

The minimal length for all identifiers, which will be used even if shorter OIDs would still be unique.

Returns

a git_oid_shorten instance, NULL if OOM

Versions