pub enum Mode {
NoChangeNeeded,
FastForward,
Forced,
New,
RejectedSourceObjectNotFound {
id: ObjectId,
},
RejectedTagUpdate,
RejectedNonFastForward,
RejectedSymbolic,
RejectedCurrentlyCheckedOut {
worktree_dir: PathBuf,
},
}
blocking-network-client
and (crate features async-network-client
or blocking-network-client
) only.Expand description
Describe the way a ref was updated
Variants
NoChangeNeeded
No change was attempted as the remote ref didn’t change compared to the current ref, or because no remote ref was specified in the ref-spec.
FastForward
The old ref’s commit was an ancestor of the new one, allowing for a fast-forward without a merge.
Forced
The ref was set to point to the new commit from the remote without taking into consideration its ancestry.
New
A new ref has been created as there was none before.
RejectedSourceObjectNotFound
Fields
id: ObjectId
The id of the object that didn’t exist in the object database, even though it should since it should be part of the pack.
The object id to set the target reference to could not be found.
RejectedTagUpdate
Tags can never be overwritten (whether the new object would be a fast-forward or not, or unchanged), unless the refspec specifies force.
RejectedNonFastForward
The reference update would not have been a fast-forward, and force is not specified in the ref-spec.
RejectedSymbolic
The update of a local symbolic reference was rejected.
RejectedCurrentlyCheckedOut
Fields
worktree_dir: PathBuf
The path to the worktree directory where the branch is checked out.
The update was rejected because the branch is checked out in the given worktree_dir.
Note that the check applies to any known worktree, whether it’s present on disk or not.
Trait Implementations
impl Eq for Mode
impl StructuralEq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString
]. Read more