git_commit_nth_gen_ancestor

Get the commit object that is the <n>th generation ancestor of the named commit object, following only the first parents. The returned commit has to be freed by the caller.

Passing 0 as the generation number returns another instance of the base commit itself.

extern (C) nothrow @nogc
int
git_commit_nth_gen_ancestor

Parameters

ancestor libgit2_d.types.git_commit**

Pointer where to store the ancestor commit

commit const(libgit2_d.types.git_commit)*

a previously loaded commit.

n uint

the requested generation

Return Value

Type: int

0 on success; git_error_code.GIT_ENOTFOUND if no matching ancestor exists or an error code

Meta