Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 1.6 KB

File metadata and controls

54 lines (44 loc) · 1.6 KB
layout default
menu_item api
title Revert
description Version 0.19.0
return_to
API Documentation Index
/api/
sections
commit revert
#commit
#revert

Revert.commit Async

Revert.commit(repo, revert_commit, our_commit, mainline, merge_options).then(function(index) {
  // Use index
});

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

Parameters Type
repo Repository the repository that contains the given commits.
revert_commit Commit the commit to revert
our_commit Commit the commit to revert against (e.g. HEAD)
mainline Number the parent of the revert commit, if it is a merge
merge_options MergeOptions the merge options (or null for defaults)
Returns
Index the index result

Revert.revert Async

Revert.revert(repo, commit, given_opts).then(function(result) {
  // Use result
});
Parameters Type
repo Repository the repository to revert
commit Commit the commit to revert
given_opts RevertOptions the revert options (or null for defaults)
Returns
Number zero on success, -1 on failure.