Cherry-picks the given commit against the given "our" commit, producing an
index that reflects the result of the cherry-pick.
The returned index must be freed explicitly with git_index_free
.
int git_cherry_pick_commit(git_index **out, git_repository *repo, git_commit *cherry_pick_commit, git_commit *our_commit, unsigned int mainline, const git_merge_options *merge_options);
In
out
pointer to store the index result in
In
repo
the repository that contains the given commits
In
cherry_pick_commit
the commit to cherry-pick
In
our_commit
the commit to revert against (eg, HEAD)
unsigned int
In
mainline
the parent of the revert commit, if it is a merge
In
merge_options
the merge options (or null for defaults)
int
zero on success, -1 on failure.