mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
Fix watching of Git repo in presence of scanner restarts (#37052)
The scanner is restarted after loading initial settings, and there was an optimization to not re-discover and re-watch git repositories if they already exist in the snapshot. #35865 added cleanup of watches that occurred when the scanner restarts, and so in some cases repos were no longer watched. Release Notes: - Linux: Fixed a case where Git repositories might not be watched for changes, causing branch switching to not update the UI. Co-authored-by: Julia <julia@zed.dev>
This commit is contained in:
parent
b233df8343
commit
8af212e785
1 changed files with 0 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue