pub enum MergeState {
Merged {
into: Option<String>,
},
UpstreamGone,
NoUpstreamLocal,
Tracked,
}Expand description
How a branch’s commits relate to the rest of the repo, for delete-safety messaging in the TUI. Computed offline (no fetch): from ancestry against the base/default branch, a recorded merged PR, and whether the configured upstream’s tracking ref is gone.
Variants§
Merged
Fully merged, so deletion is safe. into names the ref it merged into
(e.g. main); None means only a merged PR proves it (a squash/rebase
merge, whose commit hash differs so ancestry cannot confirm it).
Fields
UpstreamGone
An upstream was configured but its remote-tracking ref is gone and the merge could not be confirmed — most likely merged with the remote branch auto-deleted afterwards.
NoUpstreamLocal
No upstream was ever configured and the branch is not merged: genuinely local-only work that would be lost on deletion.
Tracked
A live upstream exists; the ahead/behind counts carry the detail.
Trait Implementations§
Source§impl Clone for MergeState
impl Clone for MergeState
Source§fn clone(&self) -> MergeState
fn clone(&self) -> MergeState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MergeState
impl Debug for MergeState
impl Eq for MergeState
Source§impl PartialEq for MergeState
impl PartialEq for MergeState
Source§fn eq(&self, other: &MergeState) -> bool
fn eq(&self, other: &MergeState) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MergeState
Auto Trait Implementations§
impl Freeze for MergeState
impl RefUnwindSafe for MergeState
impl Send for MergeState
impl Sync for MergeState
impl Unpin for MergeState
impl UnsafeUnpin for MergeState
impl UnwindSafe for MergeState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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