Enum gix_worktree::stack::state::attributes::Source
source · 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.