git: don't pass remote credentials callback to Remote::update_tips()

AFAICT, the credentials callback is not used by
`Remote::update_tips()`.
This commit is contained in:
Martin von Zweigbergk 2021-11-07 15:52:51 -08:00
parent 0a43bc7088
commit bdea3ae31a

View file

@ -146,15 +146,7 @@ pub fn fetch(
fetch_options.prune(FetchPrune::On);
let refspec: &[&str] = &[];
remote.download(refspec, Some(&mut fetch_options))?;
// The FetchOptions above ate our RemoteCallbacks so it seems we need to create
// a new instance.
let mut callbacks = create_remote_callbacks();
remote.update_tips(
Some(&mut callbacks),
false,
git2::AutotagOption::Unspecified,
None,
)?;
remote.update_tips(None, false, git2::AutotagOption::Unspecified, None)?;
// TODO: We could make it optional to get the default branch since we only care
// about it on clone.
let mut default_branch = None;