pub struct HttpFetchPackRequest<'a> {Show 16 fields
pub client: &'a UreqHttpClient,
pub git_dir: &'a Path,
pub format: ObjectFormat,
pub remote: &'a RemoteUrl,
pub wants: Vec<ObjectId>,
pub haves: Option<Vec<ObjectId>>,
pub shallow: Vec<ObjectId>,
pub deepen: Option<u32>,
pub promisor: bool,
pub max_input_size: Option<u64>,
pub filter: Option<PackObjectFilter>,
pub deepen_since: Option<i64>,
pub deepen_not: Vec<String>,
pub deepen_relative: bool,
pub git_protocol: Option<&'a str>,
pub omit_haves: bool,
}Expand description
Fetch wants from an HTTP 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, read 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§
§client: &'a UreqHttpClientHTTP client used for smart-HTTP RPCs.
git_dir: &'a PathLocal repository $GIT_DIR.
format: ObjectFormatLocal repository object format.
remote: &'a RemoteUrlResolved HTTP(S) remote.
wants: Vec<ObjectId>Wanted object ids.
haves: Option<Vec<ObjectId>>Caller-selected negotiation haves. None means advertise the default
local haves.
shallow: Vec<ObjectId>Existing shallow boundary to replay.
deepen: Option<u32>Requested deepen depth, if this is a shallow fetch.
promisor: boolWhether to install the response as a promisor pack.
max_input_size: Option<u64>Maximum raw pack bytes to accept from the remote (fetch.maxInputSize /
transfer.maxSize). None means unlimited.
filter: Option<PackObjectFilter>§deepen_since: Option<i64>§deepen_not: Vec<String>§deepen_relative: bool§git_protocol: Option<&'a str>§omit_haves: boolSend no have lines. Used by a partial clone’s checkout-blob top-up
fetch: the client already has the commit whose tree references the wanted
blob, so advertising it as a have would make the server treat the blob
as already transferred (reachable from the have) and omit it. Suppressing
haves forces the server to send the explicitly wanted objects.