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 git panel not updating after commit (#47222)

feeiyu48f712b49bcb
diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rs
index 4f51019dd74..9031fa30574 100644
--- a/crates/worktree/src/worktree.rs
+++ b/crates/worktree/src/worktree.rs
@@ -3073,12 +3073,10 @@ impl BackgroundScannerState {
.add(&common_dir_abs_path)
.context("failed to add common directory to watcher")
.log_err();
- if !repository_dir_abs_path.starts_with(&common_dir_abs_path) {
- watcher
- .add(&repository_dir_abs_path)
- .context("failed to add repository directory to watcher")
- .log_err();
- }
+ watcher
+ .add(&repository_dir_abs_path)
+ .context("failed to add repository directory to watcher")
+ .log_err();
let work_directory_id = work_dir_entry.id;