Cherrypick.cherrypick Async

Cherrypick.cherrypick(repo, commit, [options]).then(function(int) {
  // Use int
});

Cherrypick a commit and, changing the index and working directory

Parameters Type  
repo Repository The repo to checkout head
commit Commit The commit to cherrypick
[options] CherrypickOptions Options for the cherrypick
Returns  
int 0 on success, -1 on failure

Cherrypick.commit Async

Cherrypick.commit(repo, cherrypick_commit, our_commit, mainline, [merge_options]).then(function(int) {
  // Use int
});

Cherrypicks the given commit against “our” commit, producing an index that reflects the result of the cherrypick. The index is not backed by a repo.

Parameters Type  
repo Repository The repo to cherrypick commits
cherrypick_commit Commit The commit to cherrypick
our_commit Commit The commit to revert against
mainline int The parent of the revert commit (1 or 2) if it’s a merge, 0 otherwise
[merge_options] MergeOptions Merge options for the cherrypick
Returns  
int 0 on success, -1 on failure

Cherrypick.initOptions Sync

var result = Cherrypick.initOptions(opts, version);
Parameters Type  
opts CherrypickOptions the git_cherrypick_options struct to initialize
version Number Version of struct; pass GIT_CHERRYPICK_OPTIONS_VERSION
Returns  
Number Zero on success; -1 on failure.