Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix stale git statuses (#27735)

Cole Miller9f8776d1af20
diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rs
index 0d2b6e00c77..e9528987aa5 100644
--- a/crates/worktree/src/worktree.rs
+++ b/crates/worktree/src/worktree.rs
@@ -5061,11 +5061,10 @@ impl BackgroundScanner {
);
if let Some(work_directory_id) = work_directory_id {
- let scan_id = state.snapshot.scan_id;
state.snapshot.git_repositories.update(
&work_directory_id,
|local_repository_entry| {
- local_repository_entry.status_scan_id = scan_id;
+ local_repository_entry.status_scan_id += 1;
},
);
}
@@ -5346,7 +5345,6 @@ impl BackgroundScanner {
&local_repository.work_directory_id,
|entry| {
entry.git_dir_scan_id = scan_id;
- entry.status_scan_id = scan_id;
},
);
if let Some(repo_entry) = state