pub struct CloneOptions {Show 14 fields
pub url: String,
pub dest: PathBuf,
pub remote_name: String,
pub environment: Environment,
pub initial_branch: String,
pub thread_policy: ThreadPolicy,
pub depth: Option<u32>,
pub filter: Option<ObjectFilterSpec>,
pub branch: Option<String>,
pub single_branch: Option<bool>,
pub tags: Option<CloneTags>,
pub promisor_fetcher: Option<Arc<dyn PromisorFetcher>>,
pub bare: bool,
pub checkout: bool,
}Expand description
Options for clone.
Fields§
§url: StringSource URL or path (as passed on the command line).
dest: PathBufDirectory to create or use for the new repository.
remote_name: StringRemote name to configure (default DEFAULT_REMOTE).
environment: EnvironmentProcess environment for config and reflog identity.
initial_branch: StringInitial branch name used when initializing the empty repo (main).
thread_policy: ThreadPolicyGlobal thread policy for fetch pack ingest and the opened repository (--threads).
depth: Option<u32>Truncate fetched history to this many commits per ref tip
(git clone --depth N). Some(1) matches a shallow clone.
filter: Option<ObjectFilterSpec>Partial-clone object filter applied to the initial fetch and recorded in config.
branch: Option<String>Remote branch or tag to check out (git clone -b / --branch).
single_branch: Option<bool>Single-branch fetch (git clone --single-branch / --no-single-branch).
None matches Git: depth implies single-branch unless explicitly disabled.
Tag fetch mode. None uses Git defaults (all tags for full clones, following for shallow).
promisor_fetcher: Option<Arc<dyn PromisorFetcher>>Optional on-demand promisor fetcher installed on the opened repository (for checkout prefetch).
bare: boolCreate a bare repository (git clone --bare).
checkout: boolPopulate the index and working tree after fetch (git clone --no-checkout when false).