pub struct PushPlanContext {
pub remote_ref_names: HashSet<String>,
pub remote_branch_tips: HashSet<ObjectId>,
pub remote_tips: Option<Vec<ObjectId>>,
}Expand description
Extra inputs needed to DWIM delete targets and short push destinations.
Fields§
§remote_ref_names: HashSet<String>Advertised ref names on the remote (for delete mapping and dst guessing).
remote_branch_tips: HashSet<ObjectId>Tips of refs/heads/* on the remote (reserved for push planning; follow-tags
uses commit-graph ancestor queries instead of materializing reachable sets).
remote_tips: Option<Vec<ObjectId>>Tip of every advertised ref, or None when the advertisement was not read.
Pass it on as PushOptions::remote_ref_tips so a local
push does not scan the remote’s refs a second time. Only pass it to a push to the same
remote: load_push_plan_context and resolve_push select the same remote when given
the same override.
Implementations§
Source§impl PushPlanContext
impl PushPlanContext
Sourcepub fn from_advertised_refs(refs: impl IntoIterator<Item = RemoteRef>) -> Self
pub fn from_advertised_refs(refs: impl IntoIterator<Item = RemoteRef>) -> Self
Build a context from a remote’s ref advertisement (peeled ^{} entries are skipped).
Trait Implementations§
Source§impl Clone for PushPlanContext
impl Clone for PushPlanContext
Source§impl Debug for PushPlanContext
impl Debug for PushPlanContext
Auto Trait Implementations§
impl Freeze for PushPlanContext
impl RefUnwindSafe for PushPlanContext
impl Send for PushPlanContext
impl Sync for PushPlanContext
impl Unpin for PushPlanContext
impl UnsafeUnpin for PushPlanContext
impl UnwindSafe for PushPlanContext
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