feat(merge): add ability to cherry-pick commit

This commit is contained in:
Aleksey Kulikov 2021-09-09 15:40:05 +03:00
parent 63dabcdd2c
commit 659e69b1f2
3 changed files with 38 additions and 2 deletions

View file

@ -608,4 +608,14 @@ class Repository {
return Index(result);
}
/// Cherry-picks the given commit, producing changes in the index and working directory.
///
/// Any changes are staged for commit and any conflicts are written to the index. Callers
/// should inspect the repository's index after this completes, resolve any conflicts and
/// prepare a commit.
///
/// Throws a [LibGit2Error] if error occured.
void cherryPick(Commit commit) =>
merge_bindings.cherryPick(_repoPointer, commit.pointer);
}