pub enum Mode {
NoChangeNeeded,
FastForward,
Forced,
New,
ImplicitTagNotSentByRemote,
RejectedSourceObjectNotFound {
id: ObjectId,
},
RejectedTagUpdate,
RejectedNonFastForward,
RejectedSymbolic,
RejectedCurrentlyCheckedOut {
worktree_dir: PathBuf,
},
}
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.
ImplicitTagNotSentByRemote
The reference belongs to a tag that was listed by the server but whose target didn’t get sent as it doesn’t point to the commit-graph we were fetching explicitly.
This is kind of update is only happening if remote.<name>.tagOpt
is not set explicitly to either --tags
or --no-tags
.
RejectedSourceObjectNotFound
Fields
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
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§
source§impl PartialEq<Mode> for Mode
impl PartialEq<Mode> for Mode
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§
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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