#[non_exhaustive]pub enum RefUpdateRefusal {
Show 18 variants
InvalidRefName,
HiddenRef,
StaleInfo,
DeletionProhibited,
CurrentBranchDeletion,
CurrentBranch,
MissingObjects,
NonFastForward,
BadRef,
FastForwardCheckFailed,
ShallowUpdateNotAllowed,
UnpackerError,
AtomicTransactionFailed,
PreReceiveHookDeclined,
UpdateHookDeclined,
Policy(String),
TargetBranch {
target: String,
},
RefStore(String),
}Expand description
Why the server refused one ref update.
The Display text is the reason sent to the client on
the update’s ng <ref> <reason> status line, which Git clients show next to
the rejected ref.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidRefName
The ref name is outside refs/ or not a valid ref name.
HiddenRef
The ref is hidden by receive.hideRefs / transfer.hideRefs.
StaleInfo
The ref no longer has the value the client expected.
DeletionProhibited
Deletions are refused (receive.denyDeletes).
CurrentBranchDeletion
The update would delete the branch HEAD points at
(receive.denyDeleteCurrent).
CurrentBranch
The update would move the checked-out branch
(receive.denyCurrentBranch).
MissingObjects
The new value is not in the repository or the pushed pack.
NonFastForward
The branch update would discard commits (receive.denyNonFastForwards).
BadRef
A branch update under receive.denyNonFastForwards names a non-commit
as its old or new value.
FastForwardCheckFailed
Under receive.denyNonFastForwards, the ancestry walk between the old
and new branch tips failed, so the update could not be shown to be a
fast-forward.
ShallowUpdateNotAllowed
The pushed history ends at a boundary of the shallow client that this
repository does not hold the ancestry of, and
ReceivePolicy::shallow_update is off.
UnpackerError
The pushed pack could not be stored; see
ReceiveOutcome::unpack_error.
AtomicTransactionFailed
Another update in an atomic push was refused, so this one was not
applied either.
PreReceiveHookDeclined
The pre-receive hook script exited non-zero.
UpdateHookDeclined
The update hook script exited non-zero for this ref.
Policy(String)
A ReceiveHook refused the update with this reason.
TargetBranch
The ref is a served repository’s target branch, which changes only through the server’s own operations (snapshot checkouts’ integrate and slices), never by a push.
RefStore(String)
Writing the ref failed after every check passed.
Trait Implementations§
Source§impl Clone for RefUpdateRefusal
impl Clone for RefUpdateRefusal
Source§impl Debug for RefUpdateRefusal
impl Debug for RefUpdateRefusal
Source§impl Display for RefUpdateRefusal
impl Display for RefUpdateRefusal
impl Eq for RefUpdateRefusal
Source§impl Error for RefUpdateRefusal
impl Error for RefUpdateRefusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for RefUpdateRefusal
impl PartialEq for RefUpdateRefusal
impl StructuralPartialEq for RefUpdateRefusal
Auto Trait Implementations§
impl Freeze for RefUpdateRefusal
impl RefUnwindSafe for RefUpdateRefusal
impl Send for RefUpdateRefusal
impl Sync for RefUpdateRefusal
impl Unpin for RefUpdateRefusal
impl UnsafeUnpin for RefUpdateRefusal
impl UnwindSafe for RefUpdateRefusal
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§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.