Skip to content

Commit

Permalink
Ignore more version control systems
Browse files Browse the repository at this point in the history
Ignore `.pijul` and `.jj` as well as `.git`. This makes hx so much more
usable with VCSes other than git!
  • Loading branch information
hunger committed Mar 19, 2024
1 parent 3d4889c commit bc3771b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions helix-term/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bc3771b

Please sign in to comment.