From 895e1c09b4d9c6110b8af1a3ac17d51d6fca41ae Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 19 Mar 2024 15:08:50 +0100 Subject: [PATCH] Ignore more version control systems (#9935) Ignore `.pijul` and `.jj` as well as `.git`. This makes hx so much more usable with VCSes other than git! --- helix-term/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helix-term/src/lib.rs b/helix-term/src/lib.rs index cdde86ec5903c..8b7919951813d 100644 --- a/helix-term/src/lib.rs +++ b/helix-term/src/lib.rs @@ -48,10 +48,13 @@ fn true_color() -> bool { /// Function used for filtering dir entries in the various file pickers. fn filter_picker_entry(entry: &DirEntry, root: &Path, dedup_symlinks: bool) -> bool { - // We always want to ignore the .git directory, otherwise if + // We always want to ignore popular VCS directories, otherwise if // `ignore` is turned off, we end up with a lot of noise // in our picker. - if entry.file_name() == ".git" { + if matches!( + entry.file_name().to_str(), + Some(".git" | ".pijul" | ".jj" | ".hg") + ) { return false; }