mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-16 20:54:27 +00:00
git: remove unused parameter from GitFetch::get_default_branch
This commit is contained in:
parent
34f36d41e2
commit
4f6e79a22a
@ -222,8 +222,7 @@ fn fetch_new_remote(
|
|||||||
with_remote_git_callbacks(ui, |cb| {
|
with_remote_git_callbacks(ui, |cb| {
|
||||||
git_fetch.fetch(remote_name, &[StringPattern::everything()], cb, depth)
|
git_fetch.fetch(remote_name, &[StringPattern::everything()], cb, depth)
|
||||||
})?;
|
})?;
|
||||||
let default_branch =
|
let default_branch = git_fetch.get_default_branch(remote_name)?;
|
||||||
with_remote_git_callbacks(ui, |cb| git_fetch.get_default_branch(remote_name, cb))?;
|
|
||||||
let import_stats = git_fetch.import_refs()?;
|
let import_stats = git_fetch.import_refs()?;
|
||||||
print_git_import_stats(ui, fetch_tx.repo(), &import_stats, true)?;
|
print_git_import_stats(ui, fetch_tx.repo(), &import_stats, true)?;
|
||||||
fetch_tx.finish(ui, "fetch from git remote into empty repo")?;
|
fetch_tx.finish(ui, "fetch from git remote into empty repo")?;
|
||||||
|
@ -2207,11 +2207,10 @@ impl<'a> GitFetch<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Queries remote for the default branch name.
|
/// Queries remote for the default branch name.
|
||||||
#[tracing::instrument(skip(self, _callbacks))]
|
#[tracing::instrument(skip(self))]
|
||||||
pub fn get_default_branch(
|
pub fn get_default_branch(
|
||||||
&self,
|
&self,
|
||||||
remote_name: &RemoteName,
|
remote_name: &RemoteName,
|
||||||
_callbacks: RemoteCallbacks<'_>,
|
|
||||||
) -> Result<Option<RefNameBuf>, GitFetchError> {
|
) -> Result<Option<RefNameBuf>, GitFetchError> {
|
||||||
if self
|
if self
|
||||||
.git_repo
|
.git_repo
|
||||||
|
@ -148,8 +148,7 @@ fn git_fetch(
|
|||||||
git::RemoteCallbacks::default(),
|
git::RemoteCallbacks::default(),
|
||||||
None,
|
None,
|
||||||
)?;
|
)?;
|
||||||
let default_branch =
|
let default_branch = git_fetch.get_default_branch(remote_name)?;
|
||||||
git_fetch.get_default_branch(remote_name, git::RemoteCallbacks::default())?;
|
|
||||||
|
|
||||||
let import_stats = git_fetch.import_refs().unwrap();
|
let import_stats = git_fetch.import_refs().unwrap();
|
||||||
let stats = GitFetchStats {
|
let stats = GitFetchStats {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user