Skip to content

fix(git): switch ignored files resolver to git-ls-files for consistency#2047

Merged
pynappo merged 2 commits into
nvim-neo-tree:mainfrom
Thaumy:main
Jun 6, 2026
Merged

fix(git): switch ignored files resolver to git-ls-files for consistency#2047
pynappo merged 2 commits into
nvim-neo-tree:mainfrom
Thaumy:main

Conversation

@Thaumy

@Thaumy Thaumy commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Commit ea7491e introduced a performance optimization using git-check-ignore to speed up resolving ignored files in large repositories. However, git-check-ignore behaves differently from git-status when dealing with directories that contain only ignored files.

With the previous optimization, such directories would initially be displayed (due to check-ignore logic) but would disappear upon reopening neo-tree (which relies on git status results). This inconsistency is confusing for users.

I measured the execution time of the relevant git commands emitted by neo-tree in a large repository (Linux kernel source tree):

  • git status: ~230ms
  • git ls-files: ~120ms
  • git check-ignore: ~40ms

(The real command is very long so I only show the git sub command type.)

While git check-ignore is the fastest, git ls-files is still significantly faster than git status while maintaining behavioral consistency with git-status.

This removes check-ignore.lua, and switches the ignored files resolver to use git-ls-files for a simple fix.

@pynappo pynappo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, tysm

@pynappo pynappo merged commit a3adf0a into nvim-neo-tree:main Jun 6, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants