diff --git a/cli/src/commands/git/clone.rs b/cli/src/commands/git/clone.rs index 8932b9508..c418f0e7c 100644 --- a/cli/src/commands/git/clone.rs +++ b/cli/src/commands/git/clone.rs @@ -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")?; diff --git a/lib/src/git.rs b/lib/src/git.rs index 03412388c..43a4df987 100644 --- a/lib/src/git.rs +++ b/lib/src/git.rs @@ -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, GitFetchError> { if self .git_repo diff --git a/lib/tests/test_git.rs b/lib/tests/test_git.rs index a7b887fe9..2a223f12b 100644 --- a/lib/tests/test_git.rs +++ b/lib/tests/test_git.rs @@ -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 {