pub enum RemoteDivergence {
InSync,
Ahead {
commits: usize,
},
Behind {
commits: usize,
},
Diverged {
ahead: usize,
behind: usize,
},
NoRemote,
}Expand description
Divergence state between a local branch and its tracking remote (upstream, falls back to origin).
This is distinct from BranchState::Diverged which tracks divergence from the
parent branch (needs sync). RemoteDivergence tracks local vs remote (needs push/pull).
Variants§
InSync
Local and remote are at the same commit.
Ahead
Local has commits not on remote (safe push).
Behind
Remote has commits not on local (need pull).
Diverged
Both have unique commits (need force push after rebase).
Fields
NoRemote
No remote tracking branch exists (first push).
Trait Implementations§
Source§impl Clone for RemoteDivergence
impl Clone for RemoteDivergence
Source§fn clone(&self) -> RemoteDivergence
fn clone(&self) -> RemoteDivergence
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemoteDivergence
impl Debug for RemoteDivergence
Source§impl PartialEq for RemoteDivergence
impl PartialEq for RemoteDivergence
impl Eq for RemoteDivergence
impl StructuralPartialEq for RemoteDivergence
Auto Trait Implementations§
impl Freeze for RemoteDivergence
impl RefUnwindSafe for RemoteDivergence
impl Send for RemoteDivergence
impl Sync for RemoteDivergence
impl Unpin for RemoteDivergence
impl UnsafeUnpin for RemoteDivergence
impl UnwindSafe for RemoteDivergence
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