pub fn with_fetch_options(
    git_config: &Config,
    url: &str,
    config: &Config,
    cb: &mut dyn FnMut(FetchOptions<'_>) -> CargoResult<()>
) -> CargoResult<()>
Expand description

Prepares the callbacks for fetching a git repository.

The main purpose of this function is to construct everything before a fetch. This will attempt to setup a progress bar, the authentication for git, ssh known hosts check, and the network retry mechanism.

The callback is provided a fetch options, which can be used by the actual git fetch.