pub struct ConflictState {
pub operation_label: String,
pub original_branch_oid: String,
pub new_tip_oid: String,
pub conflicting_commit_oid: String,
pub remaining_oids: Vec<String>,
pub conflicting_files: Vec<String>,
pub still_unresolved: bool,
pub moved_commit_oid: Option<String>,
pub squash_context: Option<SquashContext>,
}Expand description
Enough state to resume or abort a conflicted rebase.
When a cherry-pick produces conflicts during a rebase, the partially
merged index is written to the working tree. The user resolves the
conflicts, then calls rebase_continue (which reads the resolved
index and creates the commit) or rebase_abort (which restores
the branch to original_branch_oid).
Fields§
§operation_label: StringHuman-readable label for the operation that triggered this conflict (e.g. “Drop”, “Squash”). Used in dialog titles and messages.
original_branch_oid: StringThe branch tip OID before the operation started, used to restore on abort.
new_tip_oid: StringThe new tip OID built so far (all commits cherry-picked before the conflicting one).
conflicting_commit_oid: StringThe OID of the commit whose cherry-pick conflicted.
remaining_oids: Vec<String>OIDs of commits that still need to be cherry-picked after the conflicting commit is resolved, in order (oldest first).
conflicting_files: Vec<String>Paths of files that have conflict markers in the index (stage > 0). Collected at the point of conflict so the dialog can list them.
still_unresolved: boolTrue when rebase_continue was called but the index still had
unresolved entries. The dialog uses this to show a warning to the user.
moved_commit_oid: Option<String>When this conflict was triggered by a move operation, this holds the OID of the commit being moved. The conflict view uses it to tell the user whether the moved commit itself conflicted or a successor did.
squash_context: Option<SquashContext>When present, the conflict arose during the initial squash tree
creation (source vs target overlap). After the user resolves the
conflict the TUI should open the editor and then call
squash_finalize instead of rebase_continue.
Implementations§
Source§impl ConflictState
impl ConflictState
Sourcepub fn is_squash_tree_conflict(&self) -> bool
pub fn is_squash_tree_conflict(&self) -> bool
Whether this conflict arose from a squash-time tree conflict (as opposed to a descendant rebase conflict).
Trait Implementations§
Source§impl Clone for ConflictState
impl Clone for ConflictState
Source§fn clone(&self) -> ConflictState
fn clone(&self) -> ConflictState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConflictState
impl Debug for ConflictState
Source§impl PartialEq for ConflictState
impl PartialEq for ConflictState
impl Eq for ConflictState
impl StructuralPartialEq for ConflictState
Auto Trait Implementations§
impl Freeze for ConflictState
impl RefUnwindSafe for ConflictState
impl Send for ConflictState
impl Sync for ConflictState
impl Unpin for ConflictState
impl UnsafeUnpin for ConflictState
impl UnwindSafe for ConflictState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more