aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorTobias Hunger2024-03-19 14:08:50 +0000
committerGitHub2024-03-19 14:08:50 +0000
commit1d1806c85af37bfb2c8e972bd6e07df08fab61dc (patch)
tree1e8cc65df468ff8ed59d3056701a4bfebdb81e03 /helix-term/src
parent4b4947639a4495e6a0ebd0d5ce44ff083e240b7b (diff)
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!
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/helix-term/src/lib.rs b/helix-term/src/lib.rs
index cdde86ec..8b791995 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;
}