pub enum SwitchPlan {
Switch {
to: String,
},
Keep {
branch: String,
},
Diverged {
on: String,
configured: String,
},
}Expand description
What to do with one submodule’s checkout, decided purely from its current branch
(None = detached HEAD) and its declared .gitmodules branch. This is the whole
“un-detach only, never yank a named branch” policy in one testable function.
Variants§
Switch
Detached HEAD → switch onto the configured branch.
Keep
Already on the configured branch → nothing to do.
Diverged
On a different named branch → report the divergence, do NOT switch.
Trait Implementations§
Source§impl Debug for SwitchPlan
impl Debug for SwitchPlan
impl Eq for SwitchPlan
Source§impl PartialEq for SwitchPlan
impl PartialEq for SwitchPlan
Source§fn eq(&self, other: &SwitchPlan) -> bool
fn eq(&self, other: &SwitchPlan) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SwitchPlan
Auto Trait Implementations§
impl Freeze for SwitchPlan
impl RefUnwindSafe for SwitchPlan
impl Send for SwitchPlan
impl Sync for SwitchPlan
impl Unpin for SwitchPlan
impl UnsafeUnpin for SwitchPlan
impl UnwindSafe for SwitchPlan
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.