Skip to main content

LocalDeepenPlan

Struct LocalDeepenPlan 

Source
pub struct LocalDeepenPlan {
    pub depth: u32,
    pub deepen_since: bool,
    pub deepen_not: usize,
    pub client_shallow: Vec<ObjectId>,
    pub shallow_info: Vec<ProtocolV2FetchShallowInfo>,
    pub excluded: HashSet<ObjectId>,
    pub extra_wants: Vec<ObjectId>,
}
Expand description

The in-process upload-pack’s plan for a deepen (shallow) local fetch: which shallow/unshallow updates to report, which commits the pack walk must stop at, and which extra tips become packable because the client’s boundary moved.

Mirrors upstream upload-pack.c::deepen + shallow.c::get_shallow_commits.

Fields§

§depth: u32

The requested deepen depth (--depth N; INFINITE_DEPTH for --unshallow and for the implicit deepen a shallow server runs on a plain fetch; 0 for the deepen-since/deepen-not rev-list modes).

§deepen_since: bool

The request carried deepen-since (trace2 fetch-info parity).

§deepen_not: usize

Number of deepen-not entries in the request (trace2 parity).

§client_shallow: Vec<ObjectId>

The client’s existing shallow boundary ($GIT_DIR/shallow), replayed as shallow lines in the upload-pack request.

§shallow_info: Vec<ProtocolV2FetchShallowInfo>

The server’s shallow/unshallow updates the client must fold into $GIT_DIR/shallow after the pack lands (see crate::apply_shallow_info).

§excluded: HashSet<ObjectId>

Out-of-boundary commits (the parents of boundary commits that are not themselves within the boundary): excluding these from the pack walk truncates history at the boundary while keeping every tree/blob of the boundary commits themselves.

§extra_wants: Vec<ObjectId>

Parents of client-shallow commits this deepen un-shallowed, added as extra pack tips so the newly visible history is sent (upload-pack adds them to want_obj in send_unshallow).

Trait Implementations§

Source§

impl Clone for LocalDeepenPlan

Source§

fn clone(&self) -> LocalDeepenPlan

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocalDeepenPlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.