pub enum Source {
IdMapping,
IdMappingThenWorktree,
WorktreeThenIdMapping,
}
attributes
only.Expand description
Decide where to read .gitattributes
files from.
To Retrieve attribute files from id mappings, see State::id_mappings_from_index().
These mappings are typically produced from an index. If a tree should be the source, build an attribute list from a tree instead, or convert a tree to an index.
Variants§
IdMapping
Use this when no worktree checkout is available, like in bare repositories, during clones, or when accessing blobs from other parts of the history which aren’t checked out.
IdMappingThenWorktree
Read from an id mappings and if not present, read from the worktree.
This us typically used when checking out files.
WorktreeThenIdMapping
Read from the worktree and if not present, read them from the id mappings.
This is typically used when checking in files, and it’s possible for sparse worktrees not to have a .gitattribute
file
checked out even though it’s available in the index.
Implementations§
Trait Implementations§
impl Copy for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)