use git_object::{bstr::BStr, tree};
#[derive(Clone, Copy, PartialOrd, PartialEq, Ord, Eq, Hash)]
pub enum Action {
Continue,
Cancel,
Skip,
}
impl Action {
pub fn cancelled(&self) -> bool {
matches!(self, Action::Cancel)
}
}
pub trait Visit {
fn pop_front_tracked_path_and_set_current(&mut self);
fn push_back_tracked_path_component(&mut self, component: &BStr);
fn push_path_component(&mut self, component: &BStr);
fn pop_path_component(&mut self);
fn visit_tree(&mut self, entry: &tree::EntryRef<'_>) -> Action;
fn visit_nontree(&mut self, entry: &tree::EntryRef<'_>) -> Action;
}