Skip to main content

run_with_selector

Function run_with_selector 

Source
pub fn run_with_selector<S>(
    repo: &Repository,
    selector: S,
) -> Result<(), Box<dyn Error>>
where S: FnOnce(&str, &[&str]) -> Result<Option<usize>, Box<dyn Error>>,
Expand description

Run the branch-switching workflow with a caller-provided selector.

ยงErrors

Returns an error when the repository cannot be inspected, no alternate local branches exist, selection is canceled or invalid, or checkout fails.