git_object_short_id

Get a short abbreviated OID string for the object

This starts at the "core.abbrev" length (default 7 characters) and iteratively extends to a longer string if that length is ambiguous. The result will be unambiguous (at least until new objects are added to the repository).

extern (C) nothrow @nogc public
int
git_object_short_id

Parameters

out_ libgit2.buffer.git_buf*

Buffer to write string into

obj const(libgit2.types.git_object)*

The object to get an ID for

Return Value

Type: int

0 on success, <0 for error

Meta