git_revert_commit

Reverts the given commit against the given "our" commit, producing an index that reflects the result of the revert.

The returned index must be freed explicitly with git_index_free.

Parameters

out_ libgit2_d.types.git_index**

pointer to store the index result in

repo libgit2_d.types.git_repository*

the repository that contains the given commits

revert_commit libgit2_d.types.git_commit*

the commit to revert

our_commit libgit2_d.types.git_commit*

the commit to revert against (eg, HEAD)

mainline uint

the parent of the revert commit, if it is a merge

merge_options const(libgit2_d.merge.git_merge_options)*

the merge options (or null for defaults)

Return Value

Type: int

zero on success, -1 on failure.

Meta