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.
test_mkdir_calls: usize
just for testing
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) -> State
pub fn for_checkout(unlink_on_collision: bool, attributes: Attributes) -> State
Configure a state to be suitable for checking out files.
sourcepub fn for_add(attributes: Attributes, ignore: Ignore) -> State
pub fn for_add(attributes: Attributes, ignore: Ignore) -> State
Configure a state for adding files.
sourcepub fn for_status(ignore: Ignore) -> State
pub fn for_status(ignore: Ignore) -> State
Configure a state for status retrieval.
sourceimpl State
impl State
sourcepub fn build_attribute_list(
&self,
index: &State,
paths: &'paths [u8],
case: Case
) -> Vec<(&'paths BStr, ObjectId), Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn build_attribute_list(
&self,
index: &State,
paths: &'paths [u8],
case: Case
) -> Vec<(&'paths BStr, ObjectId), Global>ⓘ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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more