From 70d78123b94d93c801171ac3dd29e2a493feee20 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Sun, 11 Dec 2022 11:20:34 +0100 Subject: properly handle detachted git worktrees (#5097) --- helix-term/src/ui/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term') diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index f61c4c45..107e48dd 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -207,7 +207,7 @@ pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> FilePi // Cap the number of files if we aren't in a git project, preventing // hangs when using the picker in your home directory - let files: Vec<_> = if root.join(".git").is_dir() { + let files: Vec<_> = if root.join(".git").exists() { files.collect() } else { // const MAX: usize = 8192; -- cgit v1.2.3-70-g09d2