pub fn apply_slice(
repo: &Repo,
dir: &Path,
base: &str,
head_ref: &str,
files: &[String],
) -> Result<bool>Expand description
Put one slice of the parent’s change on this branch.
The parent’s own diff for those paths, applied, rather than its versions of those files copied over. The branch starts from the base as it is now, and copying would revert whatever the base did to the same file after the pull request was opened, which is a deletion nobody asked for in a change advertised as one part of somebody else’s.
Reports whether anything is actually staged, because a slice that changed nothing is a part with no content.
Public so that it can be tested against a real repository, which is where it goes wrong.