pub struct PathProtection {
pub protect_hfs: bool,
pub protect_ntfs: bool,
}Expand description
Path protection settings from core.protectHFS / core.protectNTFS.
Fields§
§protect_hfs: boolReject paths that HFS+ would fold onto .git (core.protectHFS).
protect_ntfs: boolReject paths that NTFS would fold onto .git (core.protectNTFS).
Implementations§
Source§impl PathProtection
impl PathProtection
Sourcepub fn load(git_dir: &Path) -> Self
pub fn load(git_dir: &Path) -> Self
Load protection settings from the repository config at git_dir,
applying Git’s platform defaults when unset.
Sourcepub fn from_config(config: &ConfigSet) -> Self
pub fn from_config(config: &ConfigSet) -> Self
Resolve protection settings from an already-loaded ConfigSet.
Mirrors Git’s defaults (environment.c): core.protectHFS defaults on
for Apple platforms, core.protectNTFS defaults on everywhere
(PROTECT_NTFS_DEFAULT). An explicit config value overrides the default.
Trait Implementations§
Source§impl Clone for PathProtection
impl Clone for PathProtection
Source§fn clone(&self) -> PathProtection
fn clone(&self) -> PathProtection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PathProtection
Auto Trait Implementations§
impl Freeze for PathProtection
impl RefUnwindSafe for PathProtection
impl Send for PathProtection
impl Sync for PathProtection
impl Unpin for PathProtection
impl UnsafeUnpin for PathProtection
impl UnwindSafe for PathProtection
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