pub enum FetchRefspecPlan {
Pattern {
positive: Vec<RefspecItem>,
negatives: Vec<RefspecItem>,
},
Mixed {
explicit: Vec<ResolvedFetchRef>,
pattern_positive: Vec<RefspecItem>,
negatives: Vec<RefspecItem>,
},
}Expand description
Outcome of FetchRefspecPlan::resolve.
Variants§
Pattern
Wildcard / configured refspecs only: match positive refspec items over all remote refs.
Fields
§
positive: Vec<RefspecItem>Positive refspec items to match against every advertised ref.
§
negatives: Vec<RefspecItem>Negative refspec items excluding advertised refs.
Mixed
Command-line refspecs include at least one explicit (non-wildcard) source.
Fields
§
explicit: Vec<ResolvedFetchRef>Resolved explicit fetch/update pairs in fetch order.
§
pattern_positive: Vec<RefspecItem>Wildcard / matching refspecs from the same command line.
§
negatives: Vec<RefspecItem>Negative refspec items excluding advertised refs.
Implementations§
Source§impl FetchRefspecPlan
impl FetchRefspecPlan
Sourcepub fn resolve(
input: &FetchRefspecInput,
remote: FetchRemoteAdvertisement<'_>,
) -> Result<Self, FetchRefspecError>
pub fn resolve( input: &FetchRefspecInput, remote: FetchRemoteAdvertisement<'_>, ) -> Result<Self, FetchRefspecError>
Classify refspecs and resolve explicit sources against remote.
§Errors
Returns FetchRefspecError when an explicit source cannot be resolved uniquely.
Sourcepub fn is_explicit(&self) -> bool
pub fn is_explicit(&self) -> bool
Whether this fetch used explicit (non-wildcard) command-line refspecs.
Trait Implementations§
Source§impl Clone for FetchRefspecPlan
impl Clone for FetchRefspecPlan
Auto Trait Implementations§
impl Freeze for FetchRefspecPlan
impl RefUnwindSafe for FetchRefspecPlan
impl Send for FetchRefspecPlan
impl Sync for FetchRefspecPlan
impl Unpin for FetchRefspecPlan
impl UnsafeUnpin for FetchRefspecPlan
impl UnwindSafe for FetchRefspecPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more