libgit2

git_revwalk_push

Version:

Add a new root for the traversal

The pushed commit will be marked as one of the roots from which to start the walk. This commit may not be walked if it or a child is hidden.

At least one commit must be pushed onto the walker before a walk can be started.

The given id must belong to a committish on the walked repository.

Signature

int git_revwalk_push(git_revwalk *walk, const git_oid *id);

Parameters

In
walk

the walker being used for the traversal.

In
id

the oid of the commit to start from.

Returns

int

0 or an error code

Versions