Cherry pick #37052 onto preview (#37115)

Michael Sloan and Julia created

Co-authored-by: Julia <julia@zed.dev>

Change summary

crates/worktree/src/worktree.rs | 10 ----------
1 file changed, 10 deletions(-)

Detailed changes

crates/worktree/src/worktree.rs 🔗

@@ -3151,16 +3151,6 @@ impl BackgroundScannerState {
             .work_directory_abs_path(&work_directory)
             .log_err()?;
 
-        if self
-            .snapshot
-            .git_repositories
-            .get(&work_dir_entry.id)
-            .is_some()
-        {
-            log::trace!("existing git repository for {work_directory:?}");
-            return None;
-        }
-
         let dot_git_abs_path: Arc<Path> = self
             .snapshot
             .abs_path