diff --git a/crates/fs/src/fake_git_repo.rs b/crates/fs/src/fake_git_repo.rs index aea2420f9ff43fc9f36cfb9ccd90ec493014840a..751796fb83164b78dc5d6789f0ae7870eff16ce1 100644 --- a/crates/fs/src/fake_git_repo.rs +++ b/crates/fs/src/fake_git_repo.rs @@ -1310,10 +1310,6 @@ impl GitRepository for FakeGitRepository { async { Ok(()) }.boxed() } - fn repair_worktrees(&self) -> BoxFuture<'_, Result<()>> { - async { Ok(()) }.boxed() - } - fn set_trusted(&self, trusted: bool) { self.is_trusted .store(trusted, std::sync::atomic::Ordering::Release); diff --git a/crates/git/src/repository.rs b/crates/git/src/repository.rs index d4133898cb23eaa3863e71a59642605b305ac59e..c42d2e28cf041e40404c1b8276ddcf5d10ca5f01 100644 --- a/crates/git/src/repository.rs +++ b/crates/git/src/repository.rs @@ -923,8 +923,6 @@ pub trait GitRepository: Send + Sync { fn repair_worktrees(&self) -> BoxFuture<'_, Result<()>>; - fn repair_worktrees(&self) -> BoxFuture<'_, Result<()>>; - fn set_trusted(&self, trusted: bool); fn is_trusted(&self) -> bool; } @@ -2223,17 +2221,6 @@ impl GitRepository for RealGitRepository { .boxed() } - fn repair_worktrees(&self) -> BoxFuture<'_, Result<()>> { - let git_binary = self.git_binary(); - self.executor - .spawn(async move { - let args: Vec = vec!["worktree".into(), "repair".into()]; - git_binary?.run(&args).await?; - Ok(()) - }) - .boxed() - } - fn push( &self, branch_name: String, diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 743edadeff679ce0edd9e13a1aef0dd1b76da5fd..e7e84ffe673881d898a56b64892887b9c8d6c809 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -6174,19 +6174,6 @@ impl Repository { }) } - pub fn repair_worktrees(&mut self) -> oneshot::Receiver> { - self.send_job(None, move |repo, _cx| async move { - match repo { - RepositoryState::Local(LocalRepositoryState { backend, .. }) => { - backend.repair_worktrees().await - } - RepositoryState::Remote(_) => { - anyhow::bail!("repair_worktrees is not supported for remote repositories") - } - } - }) - } - pub fn remove_worktree(&mut self, path: PathBuf, force: bool) -> oneshot::Receiver> { let id = self.id; self.send_job(