pub enum IntegrationReason {
SameCommit,
Ancestor,
NoAddedChanges,
TreesMatch,
MergeAddsNothing,
}Expand description
Why branch content is considered integrated into the target branch.
Used by both wt list (for status symbols) and wt remove (for messages).
Each variant corresponds to a specific integration check. In wt list,
three symbols represent these checks:
_forSameCommitwith clean working tree (empty)–forSameCommitwith dirty working tree⊂for all others (content integrated via different history)
The checks are ordered by cost (cheapest first):
SameCommit- commit SHA comparison (~1ms)Ancestor- ancestor check (~1ms)NoAddedChanges- three-dot diff (~50-100ms)TreesMatch- tree SHA comparison (~100-300ms)MergeAddsNothing- merge simulation (~500ms-2s)
Variants§
SameCommit
Branch HEAD is literally the same commit as target.
Used by wt remove to determine if branch is safely deletable.
In wt list, same-commit state is shown via MainState::Empty (_) or
MainState::SameCommit (–) depending on working tree cleanliness.
Ancestor
Branch HEAD is an ancestor of target (target has moved past this branch).
Symbol in wt list: ⊂
NoAddedChanges
Three-dot diff (main...branch) shows no files.
The branch has no file changes beyond the merge-base.
Symbol in wt list: ⊂
TreesMatch
Branch tree SHA equals target tree SHA. Commit history differs but file contents are identical.
Symbol in wt list: ⊂
MergeAddsNothing
Simulated merge (git merge-tree) produces the same tree as target.
The branch has changes, but they’re already in target via a different path.
Symbol in wt list: ⊂
Implementations§
Source§impl IntegrationReason
impl IntegrationReason
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Human-readable description for use in messages (e.g., wt remove output).
Returns a phrase that expects the target branch name to follow (e.g., “same commit as” + “main” → “same commit as main”).
Trait Implementations§
Source§impl Clone for IntegrationReason
impl Clone for IntegrationReason
Source§fn clone(&self) -> IntegrationReason
fn clone(&self) -> IntegrationReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IntegrationReason
impl Debug for IntegrationReason
Source§impl<'_derivative_strum> From<&'_derivative_strum IntegrationReason> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum IntegrationReason> for &'static str
Source§fn from(x: &'_derivative_strum IntegrationReason) -> &'static str
fn from(x: &'_derivative_strum IntegrationReason) -> &'static str
Source§impl From<IntegrationReason> for &'static str
impl From<IntegrationReason> for &'static str
Source§fn from(x: IntegrationReason) -> &'static str
fn from(x: IntegrationReason) -> &'static str
Source§impl PartialEq for IntegrationReason
impl PartialEq for IntegrationReason
Source§impl Serialize for IntegrationReason
impl Serialize for IntegrationReason
impl Copy for IntegrationReason
impl Eq for IntegrationReason
impl StructuralPartialEq for IntegrationReason
Auto Trait Implementations§
impl Freeze for IntegrationReason
impl RefUnwindSafe for IntegrationReason
impl Send for IntegrationReason
impl Sync for IntegrationReason
impl Unpin for IntegrationReason
impl UnsafeUnpin for IntegrationReason
impl UnwindSafe for IntegrationReason
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§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.