libgit2

git_revwalk_new

Version:

Allocate a new revision walker to iterate through a repo.

This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.

For maximum performance, this revision walker should be reused for different walks.

This revision walker is not thread safe: it may only be used to walk a repository on a single thread; however, it is possible to have several revision walkers in several different threads walking the same repository.

Signature

int git_revwalk_new(git_revwalk **walker, git_repository *repo);

Parameters

In
walker

pointer to the new revision walker

In
repo

the repo to walk through

Returns

int

0 on success; error code otherwise

Versions