From f3b663e3750ad61772b126833b2182749dd7b30d Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 22 Apr 2021 16:48:13 +0200 Subject: [PATCH] Ignore `.git` folder --- zed/src/worktree.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zed/src/worktree.rs b/zed/src/worktree.rs index 8ac584844b..db244e0bf2 100644 --- a/zed/src/worktree.rs +++ b/zed/src/worktree.rs @@ -306,7 +306,10 @@ impl Snapshot { } entry = parent_entry; } - Ok(false) + + relative_path.clear(); + relative_path.extend(components.iter().rev()); + Ok(relative_path.starts_with(".git")) } pub fn path_for_inode(&self, mut inode: u64, include_root: bool) -> Result {