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>,
)
| 2603 | /// let result = repo.cherry_pick(&[hash1, hash2], "feature", None)?; |
| 2604 | /// ``` |
| 2605 | pub fn cherry_pick( |
| 2606 | &self, |
| 2607 | changes: &[Hash], |
| 2608 | _from_view: &str, |
| 2609 | to_view: Option<&str>, |
| 2610 | ) -> Result<CrossViewInsertOutcome, RepositoryError> { |
| 2611 | let target = to_view.unwrap_or(&self.current_view); |
| 2612 | |
| 2613 | // For cherry-pick, we insert specific changes with dependencies |
| 2614 | let options = CrossViewInsertOptions::new("", target) |
| 2615 | .only_changes(changes.to_vec()) |
| 2616 | .with_dependencies(true); |
| 2617 | |
| 2618 | self.insert_from_view(options) |
| 2619 | } |
| 2620 | |
| 2621 | /// Record a Git SHA → Atomic change mapping in the GIT_SHA_INDEX. |
| 2622 | /// |
no test coverage detected