pub enum PushResult {
UpToDate,
WouldFastForward {
ahead: usize,
},
WouldForce {
ahead: usize,
behind: usize,
},
WouldCreate,
Pushed {
forced: bool,
},
Created,
Rejected {
detail: String,
stale: bool,
},
Skipped {
reason: SkipReason,
},
}Expand description
Variants§
UpToDate
The upstream is already at the local tip — nothing to publish.
WouldFastForward
Ahead of the upstream and not behind it: a plain push suffices. No force flag is used, on the default branch included.
WouldForce
Diverged from the upstream — ahead and behind — so the push needs the lease. This is what a rebase leaves behind, and the only variant the default-branch gate refuses.
Fields
WouldCreate
The branch has no upstream, so publishing it creates one
(--set-upstream). Included deliberately: a batch action that silently
refused every unpublished branch would be worse than one that publishes it,
and --force-with-lease is a no-op against a ref that does not exist yet.
Pushed
Published to the existing upstream.
Fields
Created
Published a branch that had no upstream, and recorded the tracking ref.
Rejected
The remote refused the update, or git push failed.
Fields
Skipped
Skipped without contacting the remote, for a structural reason.
Fields
reason: SkipReasonWhy it was skipped.
Implementations§
Source§impl PushResult
impl PushResult
Sourcepub const fn is_pending(&self) -> bool
pub const fn is_pending(&self) -> bool
Whether this outcome still has something to publish — i.e. whether
execute will act on it.
Trait Implementations§
Source§impl Clone for PushResult
impl Clone for PushResult
Source§fn clone(&self) -> PushResult
fn clone(&self) -> PushResult
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 PushResult
impl Debug for PushResult
impl Eq for PushResult
Source§impl PartialEq for PushResult
impl PartialEq for PushResult
Source§impl Serialize for PushResult
impl Serialize for PushResult
impl StructuralPartialEq for PushResult
Auto Trait Implementations§
impl Freeze for PushResult
impl RefUnwindSafe for PushResult
impl Send for PushResult
impl Sync for PushResult
impl Unpin for PushResult
impl UnsafeUnpin for PushResult
impl UnwindSafe for PushResult
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.