the_silver_searcher
the_silver_searcher copied to clipboard
Use gitignore from file's repository
Fixes https://github.com/ggreer/the_silver_searcher/issues/883
Neat, thanks for working on this! I think the usual term is "parent folder". I hope this will be merged!
It segfaults in the tests so... probably not going to get merged.
Rebased and updated for 1.0.1
+1 to this!
@ggreer can we get this merged please?
@ggreer I landed here looking for a solution to this issue.
I checked out and compiled the latest version from @forgottenswitch, and it seems to work as advertised. It makes my life easier when wandering around the codebase I'm currently spending the most time in at $DAYJOB.
Per the CI results above, the rebased version shows no sign of the segfault you mention from the original submission. make test
says:
# Ran 39 tests, 1 skipped, 0 failed.
clang-format is not available. Skipped clang-format test.
I can offer a basic test for this functionality, which this PR doesn't seem to have yet.
Would you reconsider merging this?
The previous version (backed up at https://github.com/ggreer/the_silver_searcher/compare/master...forgottenswitch:gitignore_win32) had two issues:
- Did not handle sub-repositories
- Tried to handle Win32 paths
- Also had a
base_path
->path
typo insearch_dir
:)
Now this partially implements #284 the other way (read ignores into another list instead of restricting the current one).
Factored tests and function names for readability. Squashed commits to avoid the flood. Added more tests. Stopped attempting a malloc-less dirname
, – just using copies now.
There are about 5 issues for the problem this PR is trying to solve, it'd be great if we could revive it.