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 ref name to fetch on the remote side, without updating the local side. This will write the result into FETCH_HEAD
.
Fetch a ref or refs and write the result into the FETCH_HEAD
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
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<'a> PartialEq<Fetch<'a>> for Fetch<'a>
impl<'a> PartialEq<Fetch<'a>> for Fetch<'a>
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a> Copy for Fetch<'a>
impl<'a> Eq for Fetch<'a>
impl<'a> StructuralEq for Fetch<'a>
impl<'a> StructuralPartialEq for Fetch<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Fetch<'a>
impl<'a> Send for Fetch<'a>
impl<'a> Sync for Fetch<'a>
impl<'a> Unpin for Fetch<'a>
impl<'a> UnwindSafe for Fetch<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more