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>,
)
| 2709 | /// let result = repo.cherry_pick(&[hash1, hash2], "feature", None)?; |
| 2710 | /// ``` |
| 2711 | pub fn cherry_pick( |
| 2712 | &self, |
| 2713 | changes: &[Hash], |
| 2714 | _from_view: &str, |
| 2715 | to_view: Option<&str>, |
| 2716 | ) -> Result<CrossViewInsertOutcome, RepositoryError> { |
| 2717 | let target = to_view.unwrap_or(&self.current_view); |
| 2718 | |
| 2719 | // For cherry-pick, we insert specific changes with dependencies |
| 2720 | let options = CrossViewInsertOptions::new("", target) |
| 2721 | .only_changes(changes.to_vec()) |
| 2722 | .with_dependencies(true); |
| 2723 | |
| 2724 | self.insert_from_view(options) |
| 2725 | } |
| 2726 | |
| 2727 | /// Record a Git SHA → Atomic change mapping in the GIT_SHA_INDEX. |
| 2728 | /// |
no test coverage detected