Skip to content

Commit 3da539a

Browse files
hungerpostsolar
authored andcommitted
Ignore more version control systems (helix-editor#9935)
Ignore `.pijul` and `.jj` as well as `.git`. This makes hx so much more usable with VCSes other than git!
1 parent 2d63111 commit 3da539a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

helix-term/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ fn true_color() -> bool {
4848

4949
/// Function used for filtering dir entries in the various file pickers.
5050
fn filter_picker_entry(entry: &DirEntry, root: &Path, dedup_symlinks: bool) -> bool {
51-
// We always want to ignore the .git directory, otherwise if
51+
// We always want to ignore popular VCS directories, otherwise if
5252
// `ignore` is turned off, we end up with a lot of noise
5353
// in our picker.
54-
if entry.file_name() == ".git" {
54+
if matches!(
55+
entry.file_name().to_str(),
56+
Some(".git" | ".pijul" | ".jj" | ".hg")
57+
) {
5558
return false;
5659
}
5760

0 commit comments

Comments
 (0)