pub enum ConvFlags {
Off,
Warn,
Die,
}Expand description
The core.safecrlf round-trip-warning mode, mirroring git’s
global_conv_flags_eol (environment.c). git’s default — when
core.safecrlf is unset — is ConvFlags::Warn, so the warning fires even
without any explicit config.
Variants§
Off
core.safecrlf=false: never warn.
Warn
core.safecrlf=warn (and the unset default): emit a warning when a
CRLF<->LF round-trip would not be reversible.
Die
core.safecrlf=true: die instead of warn.
Implementations§
Source§impl ConvFlags
impl ConvFlags
Sourcepub fn from_config(config: &GitConfig) -> Self
pub fn from_config(config: &GitConfig) -> Self
Resolve core.safecrlf from config, mirroring environment.c
git_default_core_config: warn -> ConvFlags::Warn, a boolean-true
value -> ConvFlags::Die, a boolean-false value -> ConvFlags::Off.
When the key is absent git leaves global_conv_flags_eol at its initial
ConvFlags::Warn, so unset also resolves to ConvFlags::Warn.
Trait Implementations§
impl Copy for ConvFlags
impl Eq for ConvFlags
impl StructuralPartialEq for ConvFlags
Auto Trait Implementations§
impl Freeze for ConvFlags
impl RefUnwindSafe for ConvFlags
impl Send for ConvFlags
impl Sync for ConvFlags
impl Unpin for ConvFlags
impl UnsafeUnpin for ConvFlags
impl UnwindSafe for ConvFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more