git_oid_pathfmt

Format a git_oid into a loose-object path string.

The resulting string is "aa/...", where "aa" is the first two hex digits of the oid and "..." is the remaining 38 digits.

extern (C) nothrow @nogc
int
git_oid_pathfmt
(
char* out_
,
const(.git_oid)* id
)

Parameters

out_ char*

output hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (41 bytes). Only the oid digits are written; a '\\0' terminator must be added by the caller if it is required.

id const(.git_oid)*

oid structure to format.

Return Value

Type: int

0 on success, non-zero callback return value, or error code

Meta