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.
Without a group, the clone still drives a hidden CloneProgress tree
and emits escape-free ten-second heartbeats, so single-shot
kernel build cannot disappear during a slow handshake or pack
index. 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 the test-visible git_clone_tag wrapper. Both entry points share the
same lower-level exact-ref fetch; the wrapper selects the native
refs/heads/* or refs/tags/* source namespace.