pub enum SparseCheckoutMode {
Auto,
Full,
Cone,
}Expand description
Selects how the patterns in a SparseCheckout are interpreted when
deciding which index paths are “in cone” (kept in the worktree).
SparseCheckoutMode::Fullinterprets the patterns exactly like.gitignorelines (full pattern matching, including*,?,**, character classes, anchoring with a leading/, directory-only/suffixes, and!negation). A path is included when the last pattern that matches it is not negated. This mirrors upstream Git’s non-conecore.sparseCheckoutbehaviour.SparseCheckoutMode::Coneinterprets the patterns as the restricted directory-prefix form Git emits forcore.sparseCheckoutCone: a literal/*(top-level files), the recursive-parent guard!/*/, and anchored directory patterns such as/dir/(everything underdir/) plus the parent guards/dir/*and!/dir/*/. Matching is purely prefix based, so glob metacharacters are treated literally.SparseCheckoutMode::Autoinspects the patterns and uses cone matching when every pattern fits the cone grammar above, otherwise full matching.
Variants§
Trait Implementations§
Source§impl Clone for SparseCheckoutMode
impl Clone for SparseCheckoutMode
Source§fn clone(&self) -> SparseCheckoutMode
fn clone(&self) -> SparseCheckoutMode
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 SparseCheckoutMode
Source§impl Debug for SparseCheckoutMode
impl Debug for SparseCheckoutMode
Source§impl Default for SparseCheckoutMode
impl Default for SparseCheckoutMode
Source§fn default() -> SparseCheckoutMode
fn default() -> SparseCheckoutMode
Returns the “default value” for a type. Read more
impl Eq for SparseCheckoutMode
Source§impl PartialEq for SparseCheckoutMode
impl PartialEq for SparseCheckoutMode
Source§fn eq(&self, other: &SparseCheckoutMode) -> bool
fn eq(&self, other: &SparseCheckoutMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SparseCheckoutMode
Auto Trait Implementations§
impl Freeze for SparseCheckoutMode
impl RefUnwindSafe for SparseCheckoutMode
impl Send for SparseCheckoutMode
impl Sync for SparseCheckoutMode
impl Unpin for SparseCheckoutMode
impl UnsafeUnpin for SparseCheckoutMode
impl UnwindSafe for SparseCheckoutMode
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