pub mod convert_to_git;
pub use convert_to_git::function::convert_to_git;
pub mod convert_to_worktree;
pub use convert_to_worktree::convert_to_worktree;
mod utils;
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum Mode {
Lf,
CrLf,
}
#[derive(Default, Debug, Copy, Clone, Eq, PartialEq)]
pub enum AutoCrlf {
Input,
Enabled,
#[default]
Disabled,
}
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum AttributesDigest {
Binary,
Text,
TextInput,
TextCrlf,
TextAuto,
TextAutoCrlf,
TextAutoInput,
}
impl From<Mode> for AttributesDigest {
fn from(value: Mode) -> Self {
match value {
Mode::Lf => AttributesDigest::TextInput,
Mode::CrLf => AttributesDigest::TextCrlf,
}
}
}
impl From<AutoCrlf> for AttributesDigest {
fn from(value: AutoCrlf) -> Self {
match value {
AutoCrlf::Input => AttributesDigest::TextAutoInput,
AutoCrlf::Enabled => AttributesDigest::TextAutoCrlf,
AutoCrlf::Disabled => AttributesDigest::Binary,
}
}
}
#[derive(Default, Debug, Copy, Clone)]
pub struct Configuration {
pub auto_crlf: AutoCrlf,
pub eol: Option<Mode>,
}
#[derive(Debug, Default, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Stats {
pub null: usize,
pub lone_cr: usize,
pub lone_lf: usize,
pub crlf: usize,
pub printable: usize,
pub non_printable: usize,
}