use std::borrow::Cow;
use bstr::BStr;
pub type Action = std::ops::ControlFlow<()>;
pub struct RewriteOptions<'a, Find>
where
Find: gix_object::FindObjectOrHeader,
{
pub resource_cache: &'a mut crate::blob::Platform,
pub find: &'a Find,
pub rewrites: crate::Rewrites,
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum ChangeRef<'lhs, 'rhs> {
Addition {
location: Cow<'rhs, BStr>,
index: usize,
entry_mode: gix_index::entry::Mode,
id: Cow<'rhs, gix_hash::oid>,
},
Deletion {
location: Cow<'lhs, BStr>,
index: usize,
entry_mode: gix_index::entry::Mode,
id: Cow<'rhs, gix_hash::oid>,
},
Modification {
location: Cow<'rhs, BStr>,
previous_index: usize,
previous_entry_mode: gix_index::entry::Mode,
previous_id: Cow<'lhs, gix_hash::oid>,
index: usize,
entry_mode: gix_index::entry::Mode,
id: Cow<'rhs, gix_hash::oid>,
},
Rewrite {
source_location: Cow<'lhs, BStr>,
source_index: usize,
source_entry_mode: gix_index::entry::Mode,
source_id: Cow<'lhs, gix_hash::oid>,
location: Cow<'rhs, BStr>,
index: usize,
entry_mode: gix_index::entry::Mode,
id: Cow<'rhs, gix_hash::oid>,
copy: bool,
},
}
pub type Change = ChangeRef<'static, 'static>;
mod change;
pub(super) mod function;