Enum gix_status::index_as_worktree::Conflict
source · pub enum Conflict {
BothDeleted,
AddedByUs,
DeletedByThem,
AddedByThem,
DeletedByUs,
BothAdded,
BothModified,
}
Expand description
Describes a conflicting entry as comparison between ‘our’ version and ‘their’ version of it.
If one side isn’t specified, it is assumed to have modified the entry. In general, there would be no conflict if both parties ended up in the same state.
Variants§
BothDeleted
Both deleted a different version of the entry.
AddedByUs
We added, they modified, ending up in different states.
DeletedByThem
They deleted the entry, we modified it.
AddedByThem
They added the entry, we modified it, ending up in different states.
DeletedByUs
We deleted the entry, they modified it, ending up in different states.
BothAdded
Both added the entry in different states.
BothModified
Both modified the entry, ending up in different states.
Implementations§
source§impl Conflict
impl Conflict
sourcepub fn try_from_entry(
entries: &[Entry],
path_backing: &PathStorageRef,
start_index: usize,
entry_path: &BStr
) -> Option<(Self, usize)>
pub fn try_from_entry( entries: &[Entry], path_backing: &PathStorageRef, start_index: usize, entry_path: &BStr ) -> Option<(Self, usize)>
Given entries
and path_backing
, both values obtained from an index, use start_index
and enumerate
all conflict stages that still match entry_path
to produce a conflict description.
Also return the amount of extra-entries that were part of the conflict declaration (not counting the entry at start_index
)
If for some reason entry at start_index
isn’t in conflicting state, None
is returned.
Trait Implementations§
source§impl Ord for Conflict
impl Ord for Conflict
source§impl PartialEq for Conflict
impl PartialEq for Conflict
source§impl PartialOrd for Conflict
impl PartialOrd for Conflict
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