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>,
)
| 2654 | /// let result = repo.cherry_pick(&[hash1, hash2], "feature", None)?; |
| 2655 | /// ``` |
| 2656 | pub fn cherry_pick( |
| 2657 | &self, |
| 2658 | changes: &[Hash], |
| 2659 | _from_view: &str, |
| 2660 | to_view: Option<&str>, |
| 2661 | ) -> Result<CrossViewInsertOutcome, RepositoryError> { |
| 2662 | let target = to_view.unwrap_or(&self.current_view); |
| 2663 | |
| 2664 | // For cherry-pick, we insert specific changes with dependencies |
| 2665 | let options = CrossViewInsertOptions::new("", target) |
| 2666 | .only_changes(changes.to_vec()) |
| 2667 | .with_dependencies(true); |
| 2668 | |
| 2669 | self.insert_from_view(options) |
| 2670 | } |
| 2671 | |
| 2672 | /// Record a Git SHA → Atomic change mapping in the GIT_SHA_INDEX. |
| 2673 | /// |
no test coverage detected