pub enum Summary {
Removed,
Added,
Modified,
TypeChange,
Renamed,
Copied,
IntentToAdd,
Conflict,
}
worktree-rewrites
only.Expand description
An easy to grasp summary of the changes of the worktree compared to the index.
Variants§
Removed
An entry exists in the index but doesn’t in the worktree.
Added
A file exists in the worktree but doesn’t have a corresponding entry in the index.
In a git status
, this would be an untracked file.
Modified
A file or submodule was modified, compared to the state recorded in the index. On Unix, the change of executable bit also counts as modification.
If the modification is a submodule, it could also stem from various other factors, like having modified or untracked files, or changes in the index.
TypeChange
The type of the entry in the worktree changed compared to the index.
This can happen if a file in the worktree now is a directory, or a symlink, for example.
Renamed
A match between an entry in the index and a differently named file in the worktree was detected, considering the index the source of a rename operation, and the worktree file the destination.
Note that the renamed file may also have been modified, but is considered similar enough.
To obtain this state, rewrite-tracking must have been enabled, as otherwise the source would be
considered Removed
and the destination would be considered Added
.
Copied
A match between an entry in the index and a differently named file in the worktree was detected, considering the index the source of the copy of a worktree file.
Note that the copied file may also have been modified, but is considered similar enough.
To obtain this state, rewrite-and-copy-tracking must have been enabled, as otherwise the source would be
considered Removed
and the destination would be considered Added
.
IntentToAdd
An index entry with a corresponding worktree file that corresponds to an untracked worktree
file marked with git add --intent-to-add
.
This means it’s not available in the object database yet even though now an entry exists that represents the worktree file. The entry represents the promise of adding a new file, no matter the actual stat or content. Effectively this means nothing changed. This also means the file is still present, and that no detailed change checks were performed.
Conflict
Describes a conflicting entry in the index, which also means that no further comparison to the worktree file was performed.
As this variant only describes the state of the index, the corresponding worktree file may or may not exist.
Trait Implementations§
source§impl Ord for Summary
impl Ord for Summary
source§impl PartialEq for Summary
impl PartialEq for Summary
source§impl PartialOrd for Summary
impl PartialOrd for Summary
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