git_clone

Function git_clone 

Source
pub fn git_clone(
    url: &str,
    git_ref: &str,
    dest_dir: &Path,
    cli_label: &str,
    mp: Option<&FetchProgress>,
) -> Result<AcquiredSource>
Expand description

Shallow-clone a git repository at a BRANCH ref.

cli_label prefixes diagnostic status output (e.g. "ktstr" or "cargo ktstr").

mp is the progress group a determinate clone bar is added to; None disables the bar and passes gix::progress::Discard to gix exactly as before (the single-shot kernel build paths and unit tests pass None). The bar shows real object/file counts + ETA during the receiving / resolving / checkout phases that gix reports a bounded total for; see the crate::cli::progress module.

For a TAG ref use git_clone_tag: gix’s shallow clone only resolves branches via with_ref_name — see git_clone_inner.