Skip to content

Commit

Permalink
Ignore more version control systems (helix-editor#9935)
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 authored and postsolar committed Apr 20, 2024
1 parent 7494a8c commit 7503eb3
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 7503eb3

Please sign in to comment.