This exposes libgit2's git_revert(), which produces changes in the index and working directory. It also affects the repository's state (via .git/REVERT_HEAD) and prepared message (via .git/MERGE_MSG).
Rationale for adding this even though Repository.revert_commit() already exists: revert_commit() is a binding for git_revert_commit(), which is less powerful -- it doesn't check out the resulting index, and it doesn't modify the state and prepared message.
Note: git_revert() accepts additional checkout/revert settings. We could implement support for these as extra arguments to Repository.revert() in the future.
This exposes libgit2's git_revert(), which produces changes in the index and working directory. It also affects the repository's state (via .git/REVERT_HEAD) and prepared message (via .git/MERGE_MSG).
Rationale for adding this even though Repository.revert_commit() already exists: revert_commit() is a binding for git_revert_commit(), which is less powerful -- it doesn't check out the resulting index, and it doesn't modify the state and prepared message.
Note: git_revert() accepts additional checkout/revert settings. We could implement support for these as extra arguments to Repository.revert() in the future.