Enum git_refspec::instruction::Fetch
source · [−]pub enum Fetch<'a> {
Only {
src: &'a BStr,
},
Exclude {
src: &'a BStr,
},
AndUpdate {
src: &'a BStr,
dst: &'a BStr,
allow_non_fast_forward: bool,
},
}
Expand description
Any source can either be a ref name (full or partial) or a fully spelled out hex-sha for an object, on the remote side.
Destinations can only be a partial or full ref-names on the local side.
Variants
Only
Fields
src: &'a BStr
The partial or full ref name to fetch on the remote side or the full object hex-name, without updating the local side. Note that this may not be a glob pattern, as those need to be matched by a destination which isn’t present here.
Fetch a ref or refs, without updating local branches.
Exclude
Fields
src: &'a BStr
A single partial or full ref name to exclude on the remote, or a pattern with a single *
. It cannot be a spelled out object hash.
Exclude a single ref.
AndUpdate
Fields
src: &'a BStr
The ref name to fetch on the remote side, or a pattern with a single *
to match against.
dst: &'a BStr
The local destination to update with what was fetched, or a pattern whose single *
will be replaced with the matching portion
of the *
from src
.
allow_non_fast_forward: bool
If true, allow non-fast-forward updates of dest
.
Fetch from src
and update the corresponding destination branches in dst
accordingly.
Trait Implementations
sourceimpl<'a> Ord for Fetch<'a>
impl<'a> Ord for Fetch<'a>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl<'a> PartialOrd<Fetch<'a>> for Fetch<'a>
impl<'a> PartialOrd<Fetch<'a>> for Fetch<'a>
sourcefn partial_cmp(&self, other: &Fetch<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &Fetch<'a>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more