Cherry-pick specific changes from one view into another. # Arguments `changes` - Hashes of changes to insert `from_view` - Source view (for validation) `to_view` - Target view (None = current view) # Returns A `CrossViewInsertOutcome` with details about what was inserted. # Example ```rust,ignore let result = repo.cherry_pick(&[hash1, hash2], "feature", None)?; ```
(
&self,
changes: &[Hash],
_from_view: &str,
to_view: Option<&str>,
)
| 3664 | /// let result = repo.cherry_pick(&[hash1, hash2], "feature", None)?; |
| 3665 | /// ``` |
| 3666 | pub fn cherry_pick( |
| 3667 | &self, |
| 3668 | changes: &[Hash], |
| 3669 | _from_view: &str, |
| 3670 | to_view: Option<&str>, |
| 3671 | ) -> Result<CrossViewInsertOutcome, RepositoryError> { |
| 3672 | let target = to_view.unwrap_or(&self.current_view); |
| 3673 | |
| 3674 | // For cherry-pick, we insert specific changes with dependencies |
| 3675 | let options = CrossViewInsertOptions::new("", target) |
| 3676 | .only_changes(changes.to_vec()) |
| 3677 | .with_dependencies(true); |
| 3678 | |
| 3679 | self.insert_from_view(options) |
| 3680 | } |
| 3681 | |
| 3682 | /// Record a Git SHA → Atomic change mapping in the GIT_SHA_INDEX. |
| 3683 | /// |
no test coverage detected