Enum gix_status::index_as_worktree::Change
source · pub enum Change<T = (), U = ()> {
Removed,
Type,
Modification {
executable_bit_changed: bool,
content_change: Option<T>,
set_entry_stat_size_zero: bool,
},
SubmoduleModification(U),
}
Expand description
How an index entry needs to be changed to obtain the destination worktree state, i.e. entry.apply(this_change) == worktree-entry
.
Variants§
Removed
This corresponding file does not exist in the worktree anymore.
Type
The type of file changed compared to the worktree, i.e. a symlink s now a file.
Modification
This worktree file was modified in some form, like a permission change or content change or both, as compared to this entry.
Fields
executable_bit_changed: bool
Indicates that one of the stat changes was an executable bit change which is a significant change itself.
content_change: Option<T>
The output of the CompareBlobs
run on this entry.
If there is no content change and only the executable bit
changed then this is None
.
set_entry_stat_size_zero: bool
If true, the caller is expected to set entry.stat.size = 0 to assure this otherwise racily clean entry can still be detected as dirty next time this is called, but this time without reading it from disk to hash it. It’s a performance optimization and not doing so won’t change the correctness of the operation.
SubmoduleModification(U)
A submodule is initialized and checked out, and there was modification to either:
- the
HEAD
as compared to the superproject’s desired commit forHEAD
- the worktree has at least one modified file
- there is at least one untracked file
The exact nature of the modification is handled by the caller which may retain information per submodule or re-compute details as needed when seeing this variant.
Trait Implementations§
source§impl<T, U> From<Change<T, U>> for EntryStatus<T, U>
impl<T, U> From<Change<T, U>> for EntryStatus<T, U>
source§impl<T: Ord, U: Ord> Ord for Change<T, U>
impl<T: Ord, U: Ord> Ord for Change<T, U>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<T: PartialEq, U: PartialEq> PartialEq for Change<T, U>
impl<T: PartialEq, U: PartialEq> PartialEq for Change<T, U>
source§impl<T: PartialOrd, U: PartialOrd> PartialOrd for Change<T, U>
impl<T: PartialOrd, U: PartialOrd> PartialOrd for Change<T, U>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more