libgit2

git_commit_parent_id

Version:

Get the oid of a specified parent for a commit. This is different from git_commit_parent, which will attempt to load the parent commit from the ODB.

Signature

const git_oid *git_commit_parent_id(const git_commit *commit, unsigned int n);

Parameters

In
commit

a previously loaded commit.

unsigned int
In
n

the position of the parent (from 0 to parentcount)

Returns

the id of the parent, NULL on error.

Versions