pub enum State {
CreateDirectoryAndAttributesStack {
unlink_on_collision: bool,
test_mkdir_calls: usize,
attributes: Attributes,
},
AttributesAndIgnoreStack {
attributes: Attributes,
ignore: Ignore,
},
IgnoreStack(Ignore),
}
Variants
CreateDirectoryAndAttributesStack
Fields
unlink_on_collision: bool
If there is a symlink or a file in our path, try to unlink it before creating the directory.
attributes: Attributes
State to handle attribute information
Useful for checkout where directories need creation, but we need to access attributes as well.
AttributesAndIgnoreStack
Fields
attributes: Attributes
State to handle attribute information
ignore: Ignore
State to handle exclusion information
Used when adding files, requiring access to both attributes and ignore information, for example during add operations.
IgnoreStack(Ignore)
Used when providing worktree status information.
Implementations
sourceimpl State
impl State
sourcepub fn for_checkout(unlink_on_collision: bool, attributes: Attributes) -> Self
pub fn for_checkout(unlink_on_collision: bool, attributes: Attributes) -> Self
Configure a state to be suitable for checking out files.
sourcepub fn for_add(attributes: Attributes, ignore: Ignore) -> Self
pub fn for_add(attributes: Attributes, ignore: Ignore) -> Self
Configure a state for adding files.
sourcepub fn for_status(ignore: Ignore) -> Self
pub fn for_status(ignore: Ignore) -> Self
Configure a state for status retrieval.
sourceimpl State
impl State
sourcepub fn build_attribute_list<'paths>(
&self,
index: &State,
paths: &'paths PathStorageRef,
case: Case
) -> Vec<(&'paths BStr, ObjectId)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn build_attribute_list<'paths>(
&self,
index: &State,
paths: &'paths PathStorageRef,
case: Case
) -> Vec<(&'paths BStr, ObjectId)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns a vec of tuples of relative index paths along with the best usable OID for either ignore, attribute files or both.
- ignores entries which aren’t blobs
- ignores ignore entries which are not skip-worktree
- within merges, picks ‘our’ stage both for ignore and attribute files.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more