git: remove unused parameter from GitFetch::get_default_branch

This commit is contained in:
Emily 2025-03-15 20:36:50 +00:00
parent 34f36d41e2
commit 4f6e79a22a
3 changed files with 3 additions and 6 deletions

View File

@ -222,8 +222,7 @@ fn fetch_new_remote(
with_remote_git_callbacks(ui, |cb| {
git_fetch.fetch(remote_name, &[StringPattern::everything()], cb, depth)
})?;
let default_branch =
with_remote_git_callbacks(ui, |cb| git_fetch.get_default_branch(remote_name, cb))?;
let default_branch = git_fetch.get_default_branch(remote_name)?;
let import_stats = git_fetch.import_refs()?;
print_git_import_stats(ui, fetch_tx.repo(), &import_stats, true)?;
fetch_tx.finish(ui, "fetch from git remote into empty repo")?;

View File

@ -2207,11 +2207,10 @@ impl<'a> GitFetch<'a> {
}
/// Queries remote for the default branch name.
#[tracing::instrument(skip(self, _callbacks))]
#[tracing::instrument(skip(self))]
pub fn get_default_branch(
&self,
remote_name: &RemoteName,
_callbacks: RemoteCallbacks<'_>,
) -> Result<Option<RefNameBuf>, GitFetchError> {
if self
.git_repo

View File

@ -148,8 +148,7 @@ fn git_fetch(
git::RemoteCallbacks::default(),
None,
)?;
let default_branch =
git_fetch.get_default_branch(remote_name, git::RemoteCallbacks::default())?;
let default_branch = git_fetch.get_default_branch(remote_name)?;
let import_stats = git_fetch.import_refs().unwrap();
let stats = GitFetchStats {