{{ message }}
fix: rtk find returns empty results after git init (#2589)#2598
Open
Saerdna wants to merge 1 commit into
Open
Conversation
Disable gitignore filtering in WalkBuilder so rtk find matches native find behavior. Previously git_ignore/git_global/git_exclude were all true, causing the ignore crate to respect .gitignore, global gitignore, and .git/info/exclude rules. This incorrectly filtered out files that are untracked or matched by global gitignore patterns (e.g. *.csv). Root cause: ignore::WalkBuilder with git_global(true) reads the user's global gitignore (e.g. ~/.config/git/ignore) and filters matching files, even when no local .gitignore rule applies. Regression test added: find_works_after_git_init creates a temp dir, verifies find works before and after git init.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
rtk findreturning empty results aftergit init(Bug:rtk findstops working aftergit init#2589)git_ignore/git_global/git_exclude) inWalkBuildersortk findmatches nativefindbehaviorTest plan
cargo clippy --all-targets && cargo test— 30/30 find_cmd tests pass, clippy cleanrtk find . -name "message.csv"returns correct results in git-initialized directory with global gitignore*.csvrule