pub enum Mode {
    NoChangeNeeded,
    FastForward,
    Forced,
    New,
    RejectedSourceObjectNotFound {
        id: ObjectId,
    },
    RejectedTagUpdate,
    RejectedNonFastForward,
    RejectedSymbolic,
    RejectedCurrentlyCheckedOut {
        worktree_dir: PathBuf,
    },
}
Available on (crate features blocking-network-client or async-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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
Converts the given value to a [CompactString]. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.