Skip to main content

ShallowOutcome

Struct ShallowOutcome 

Source
pub struct ShallowOutcome {
    pub boundary: HashSet<ObjectId>,
    pub client_boundary: HashSet<ObjectId>,
    pub include: HashSet<ObjectId>,
    pub newly_shallow: Vec<ObjectId>,
    pub unshallow: Vec<ObjectId>,
    pub unshallow_parents: Vec<ObjectId>,
}
Expand description

What the server decided about the boundary.

Fields§

§boundary: HashSet<ObjectId>

Commits the client declared shallow, whose parents are not traversed at all.

§client_boundary: HashSet<ObjectId>

Where the client’s own history stops, verbatim from its shallow <oid> lines.

Not the same field as boundary and not redundant with it, because the two bound different walks. boundary bounds the walk that decides what to send, and a deepening request deliberately walks past the client’s cut, which is what it asked for. This one bounds the walk over the client’s haves, which may never walk past the cut: a client that said shallow X holds X and none of X’s ancestors, so treating a have X as proof it holds them subtracts the whole history from the pack.

§include: HashSet<ObjectId>

When a deepening was requested, exactly the commits this fetch may send. Empty when the request only declared an existing boundary.

Separate from boundary because a merge can be cut off from one parent and keep the other (deepen-not does exactly that), and a boundary cannot express it.

§newly_shallow: Vec<ObjectId>

shallow <oid> lines to send: new cut points the client does not know.

§unshallow: Vec<ObjectId>

unshallow <oid> lines to send: commits that used to be cut and are now complete because this fetch sends their parents.

§unshallow_parents: Vec<ObjectId>

The parents of every commit in unshallow: extra tips the pack walk must start from.

An unshallow <oid> line is a promise that the pack carries that commit’s parents, and the wants alone cannot deliver it. The client offers its shallow tip as a have in the very same request, so the tip is correctly excluded from the pack, and a walk seeded only with the wants stops there and sends nothing, having already promised otherwise. Seeding the parents is how git-upload-pack closes the same gap (see send_unshallow in its upload-pack.c).

Implementations§

Source§

impl ShallowOutcome

Source

pub fn has_info(&self) -> bool

Is there a shallow-info section worth sending?

Trait Implementations§

Source§

impl Clone for ShallowOutcome

Source§

fn clone(&self) -> Self

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 ShallowOutcome

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ShallowOutcome

Source§

fn default() -> Self

Returns the “default value” for a type. 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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more