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>,
)
| 2559 | /// let result = repo.cherry_pick(&[hash1, hash2], "feature", None)?; |
| 2560 | /// ``` |
| 2561 | pub fn cherry_pick( |
| 2562 | &self, |
| 2563 | changes: &[Hash], |
| 2564 | _from_view: &str, |
| 2565 | to_view: Option<&str>, |
| 2566 | ) -> Result<CrossViewInsertOutcome, RepositoryError> { |
| 2567 | let target = to_view.unwrap_or(&self.current_view); |
| 2568 | |
| 2569 | // For cherry-pick, we insert specific changes with dependencies |
| 2570 | let options = CrossViewInsertOptions::new("", target) |
| 2571 | .only_changes(changes.to_vec()) |
| 2572 | .with_dependencies(true); |
| 2573 | |
| 2574 | self.insert_from_view(options) |
| 2575 | } |
| 2576 | |
| 2577 | /// Record a Git SHA → Atomic change mapping in the GIT_SHA_INDEX. |
| 2578 | /// |
no test coverage detected