pub enum PushRejectReason {
NonFastForward,
StaleLease,
ProtectedByHost,
RemoteRefused,
Unknown,
}Expand description
Why a remote refused a push, when it is a refusal the user can act on
rather than an arbitrary failure (see crate::Error::PushRejected).
Variants§
NonFastForward
The remote branch has commits the local one does not - git’s
non-fast-forward / fetch first. The remote has diverged.
StaleLease
A --force-with-lease push found the remote branch somewhere
other than where our remote-tracking ref said: someone pushed
since our last fetch, and the lease protected their work.
ProtectedByHost
The host’s branch protection refused the push (protected branch,
force push not allowed). The remote’s own words are in the
rejection’s detail.
RemoteRefused
Any other [remote rejected]: a pre-receive hook, permissions.
The remote’s own words are in the rejection’s detail.
Unknown
A reason a newer peer knows and this one does not.
Trait Implementations§
Source§impl Clone for PushRejectReason
impl Clone for PushRejectReason
impl Copy for PushRejectReason
Source§impl Debug for PushRejectReason
impl Debug for PushRejectReason
Source§impl<'de> Deserialize<'de> for PushRejectReason
impl<'de> Deserialize<'de> for PushRejectReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PushRejectReason
Source§impl PartialEq for PushRejectReason
impl PartialEq for PushRejectReason
Source§impl Serialize for PushRejectReason
impl Serialize for PushRejectReason
impl StructuralPartialEq for PushRejectReason
Auto Trait Implementations§
impl Forget for PushRejectReason
impl Freeze for PushRejectReason
impl Move for PushRejectReason
impl RefUnwindSafe for PushRejectReason
impl Send for PushRejectReason
impl Sync for PushRejectReason
impl Unpin for PushRejectReason
impl UnsafeUnpin for PushRejectReason
impl UnwindSafe for PushRejectReason
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