Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
worktree: Make expanded symlinks be indexed by default (#51382)
Andre Roelofs922b1b512618
diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rsindex 6665dfa532b..b08f9aaee01 100644--- a/crates/worktree/src/worktree.rs+++ b/crates/worktree/src/worktree.rs@@ -2776,7 +2776,7 @@ impl LocalSnapshot {for entry in self.entries_by_path.cursor::<()>(()) {if entry.is_file() {assert_eq!(files.next().unwrap().inode, entry.inode);- if (!entry.is_ignored && !entry.is_external) || entry.is_always_included {+ if !entry.is_ignored || entry.is_always_included {assert_eq!(visible_files.next().unwrap().inode, entry.inode);}}@@ -3455,8 +3455,7 @@ pub struct Entry {/// symlink.////// We only scan entries outside of the worktree once the symlinked- /// directory is expanded. External entries are treated like gitignored- /// entries in that they are not included in searches.+ /// directory is expanded.pub is_external: bool,/// Whether this entry is considered to be a `.env` file.@@ -3661,8 +3660,7 @@ impl sum_tree::Item for Entry {type Summary = EntrySummary;fn summary(&self, _cx: ()) -> Self::Summary {- let non_ignored_count = if (self.is_ignored || self.is_external) && !self.is_always_included- {+ let non_ignored_count = if self.is_ignored && !self.is_always_included {0} else {1