git_commit_lookup_prefix

Lookup a commit object from a repository, given a prefix of its identifier (short id).

The returned object should be released with git_commit_free when no longer needed.

@see git_object_lookup_prefix

extern (C) nothrow @nogc
int
git_commit_lookup_prefix

Parameters

commit libgit2_d.types.git_commit**

pointer to the looked up commit

repo libgit2_d.types.git_repository*

the repo to use when locating the commit.

id const(libgit2_d.oid.git_oid)*

identity of the commit to locate. If the object is an annotated tag it will be peeled back to the commit.

len size_t

the length of the short identifier

Return Value

Type: int

0 or an error code

Meta