libgit2

git_repository_commit_parents

Version:

Gets the parents of the next commit, given the current repository state. Generally, this is the HEAD commit, except when performing a merge, in which case it is two or more commits.

Signature

int git_repository_commit_parents(git_commitarray *commits, git_repository *repo);

Parameters

In
commits

a git_commitarray that will contain the commit parents

In
repo

the repository

Returns

int

0 or an error code

Versions