pub struct HttpFetchPackRequest<'a> {
pub client: &'a UreqHttpClient,
pub git_dir: &'a Path,
pub format: ObjectFormat,
pub remote: &'a RemoteUrl,
pub wants: Vec<ObjectId>,
pub shallow: Vec<ObjectId>,
pub deepen: Option<u32>,
pub promisor: 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.
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.