git_oid_shorten_add

Add a new OID to set of shortened OIDs and calculate the minimal length to uniquely identify all the OIDs in the set.

The OID is expected to be a 40-char hexadecimal string. The OID is owned by the user and will not be modified or freed.

For performance reasons, there is a hard-limit of how many OIDs can be added to a single set (around ~32000, assuming a mostly randomized distribution), which should be enough for any kind of program, and keeps the algorithm fast and memory-efficient.

Attempting to add more than those OIDs will result in a git_error_t.GIT_ERROR_INVALID error

@param os a git_oid_shorten instance @param text_id an OID in text form @return the minimal length to uniquely identify all OIDs added so far to the set; or an error code (<0) if an error occurs.

extern (C) nothrow @nogc
int
git_oid_shorten_add
(,
const(char)* text_id
)

Meta