use bstr::BStr;
use gix_index as index;
use crate::status::{Change, VisitEntry};
#[derive(Debug, Default)]
pub struct Recorder<'index, T = ()> {
pub records: Vec<(&'index BStr, Option<Change<T>>, bool)>,
}
impl<'index, T: Send> VisitEntry<'index> for Recorder<'index, T> {
type ContentChange = T;
fn visit_entry(
&mut self,
_entry: &'index index::Entry,
rela_path: &'index BStr,
status: Option<Change<Self::ContentChange>>,
conflict: bool,
) {
if conflict || status.is_some() {
self.records.push((rela_path, status, conflict))
}
}
}