forked from BurntSushi/ripgrep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cwd to resolve paths in Ignore::matched
Fixes BurntSushi#829 and BurntSushi#278. This does change the Ignore struct to depend on the working directory at the time of creation, I _think_ this is fine, since Ignore isn't publicly accessible and the Walk structs already depend on the current working directory implicitly. I tried to make a minimal change to fix the issue. An alternative implementation could be to call `current_dir` in the `matched_ignore` method instead of in `add_parents`, but I'm not sure of the performance implications of doing that. Another possible solution would be to change the places that we call `Ignore::matched` to change the path to be relative to the absolute_base of the `Ignore`.
Showing
2 changed files
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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