From 3e44a0adae9cf31cdb260c670683fb9591ba33d2 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 22 Apr 2021 10:30:47 -0700 Subject: [PATCH] Avoid redundant clearing of descendants when scanning dirs Co-Authored-By: Nathan Sobo --- zed/src/worktree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zed/src/worktree.rs b/zed/src/worktree.rs index cca39113c7..4a96729ef4 100644 --- a/zed/src/worktree.rs +++ b/zed/src/worktree.rs @@ -401,10 +401,9 @@ impl Snapshot { .entry(old_parent_inode) .or_default() .insert(child.inode()); + self.clear_descendants(child.inode(), &mut edits); } } - - self.clear_descendants(child.inode(), &mut edits); } edits.push(Edit::Insert(child)); } @@ -875,6 +874,7 @@ impl BackgroundScanner { }; } + dbg!(&job.path); self.snapshot.lock().populate_dir(job.inode, new_entries); for new_job in new_jobs { job.scan_queue.send(new_job).unwrap();