Skip to main content

SshFetchPackRequest

Struct SshFetchPackRequest 

Source
pub struct SshFetchPackRequest<'a> {
    pub git_dir: &'a Path,
    pub format: ObjectFormat,
    pub remote: &'a RemoteUrl,
    pub features: &'a UploadPackFeatures,
    pub wants: Vec<ObjectId>,
    pub shallow: Vec<ObjectId>,
    pub deepen: Option<u32>,
    pub promisor: bool,
    pub command_options: SshTransportOptions,
}
Expand description

Fetch wants from an SSH upload-pack remote into the repository at git_dir, installing the resulting pack. Objects already present locally are skipped (for non-shallow fetches); promisor selects promisor-pack installation.

When deepen is set the fetch is shallow: the request replays shallow (the client’s current boundary from $GIT_DIR/shallow) and asks the server to truncate history to deepen commits. The returned ProtocolV2FetchShallowInfo entries are the server’s shallow-info updates the caller must fold into $GIT_DIR/shallow (see crate::apply_shallow_info); they are empty for a non-deepen fetch.

Fields§

§git_dir: &'a Path

Local repository $GIT_DIR.

§format: ObjectFormat

Local repository object format.

§remote: &'a RemoteUrl

Resolved SSH remote.

§features: &'a UploadPackFeatures

Upload-pack features advertised by the remote.

§wants: Vec<ObjectId>

Wanted object ids.

§shallow: Vec<ObjectId>

Existing shallow boundary to replay.

§deepen: Option<u32>

Requested deepen depth, if this is a shallow fetch.

§promisor: bool

Whether to install the response as a promisor pack.

§command_options: SshTransportOptions

SSH command-line shape (variant and -4/-6), usually derived by the caller from effective config and command-line flags.

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> 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, 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.