/// a best attempt effort is made to authenticate
/// requests when required to support private
/// git repositories
a best attempt effort is made to authenticate
requests when required to support private
git repositories
a best attempt effort is made to authenticate requests when required to support private git repositories
fn make_fetch_options<'a>() -> Result<FetchOptions<'a>, git2::Error> {
    let mut cb = git2::RemoteCallbacks::new();
    let git_config = git2::Config::open_default()?;
    let mut ch = git2_credentials::CredentialHandler::new(git_config);
    cb.credentials(move |url, username, allowed| ch.try_next_credential(url, username, allowed));
    let mut fo = FetchOptions::new();
    let mut proxy_options = git2::ProxyOptions::new();
    proxy_options.auto();
    fo.proxy_options(proxy_options)
        .remote_callbacks(cb)
        .download_tags(git2::AutotagOption::All)
        .update_fetchhead(true);
    Ok(fo)
}
fn make_fetch_options < ' a > ( ) -> Result < FetchOptions < ' a > , git2 :: Error > { let mut cb = git2 :: RemoteCallbacks :: new ( ) ; let git_config = git2 :: Config :: open_default ( ) ? ; let mut ch = git2_credentials :: CredentialHandler :: new ( git_config ) ; cb . credentials ( move | url , username , allowed | ch . try_next_credential ( url , username , allowed ) ) ; let mut fo = FetchOptions :: new ( ) ; let mut proxy_options = git2 :: ProxyOptions :: new ( ) ; proxy_options . auto ( ) ; fo . proxy_options ( proxy_options ) . remote_callbacks ( cb ) . download_tags ( git2 :: AutotagOption :: All ) . update_fetchhead ( true ) ; Ok ( fo ) }
a best attempt effort is made to authenticate
requests when required to support private
git repositories
a best attempt effort is made to authenticate requests when required to support private git repositories