Closed aviatesk closed 5 years ago
Wow, this was fast!! Thanks a lot for the PR! 😍
Don't worry about the failure on travis, it's not caused by this PR.
Can you also add a test, so this behaviour does not get broken in the future? You can add it just below this test:
You can use that test as an inspiration, and do something like atom.config.set('core.ignoredNames', [])
at the beginning to be sore that the ignoredNames
param does not have the .git
folder in it.
To include those files, an user need to disable both core.ignoredNames and core.excludeVcsIgnoredPaths, and it might be confusing ?
I think it's such a rare case to want to search inside the .git
folder that this should be fine. Alternatively once this PR lands we can remove the .git
folder from the core.ignoredNames
default value.
I'm welcome to write specs ! 😄 Not too much sure about writing specs, but there seem a lot of examples in fuzzy-finder, thus I may make it through. Thanks for your kind mentoring !
I think it's such a rare case to want to search inside the .git folder that this should be fine. Alternatively once this PR lands we can remove the .git folder from the core.ignoredNames default value.
Yeah, I totally agree with you and the alternative also sounds sane.
@rafeca I added the spec just now ! On my local machine, I confirmed this PR can pass but the current master branch fails the spec I've just added.
I've not created a spec for the case when core.excludeVcsIgnoredPaths
is set to false
, since I thought it would make specs more verbose.
But if you want, I'm okay to add a spec for the case 😃
Thanks again for your help !
I'm really happy to be able to contribute to Atom, my favourite editor, and yeah, will make more in the future ! 😁
Looking forward to the next release !
Hi, this is my very first PR for Atom's core system ! 😁
Rationale
If an user's
core.ignoredNames
is modified so that it doesn't include.git
or.hg
(they are included by default) but stillcore.excludeVcsIgnoredPaths
istrue
, then the newfast
mode usingripgrep
will show files in those directories (likeHEAD
,COMMIT_EDITMSG
and so on).Because those files are usually regarded as VCS-ignored files and more over, the previous
alternative
mode does exclude those files whencore.excludeVcsIgnoredPaths
istrue
, I believe these files are better to be ignored infast
mode as well.Please refer to https://github.com/atom/fuzzy-finder/issues/379#issuecomment-502635850 for more detail.
Description of the Change
Only 5 line changes: Add
ripgrep
arguments to exclude those files whencore.excludeVcsIgnoredPaths
istrue
.Possible Drawbacks
To include those files, an user need to disable both
core.ignoredNames
andcore.excludeVcsIgnoredPaths
, and it might be confusing ?