Function cargo::sources::git::utils::fetch_with_cli

source ยท
fn fetch_with_cli(
    repo: &mut Repository,
    url: &str,
    refspecs: &[String],
    tags: bool,
    gctx: &GlobalContext,
) -> CargoResult<()>
Expand description

Attempts to use git CLI installed on the system to fetch a repository, when the config value net.git-fetch-with-cli is set.

Unfortunately libgit2 is notably lacking in the realm of authentication when compared to the git command line. As a result, allow an escape hatch for users that would prefer to use git-the-CLI for fetching repositories instead of libgit2-the-library. This should make more flavors of authentication possible while also still giving us all the speed and portability of using libgit2.