Closed artgillespie closed 7 years ago
@artgillespie Thanks so much for figuring this out. I'd like to get a test on this behavior before merging, if possible. Are you interested in trying to add a test? Let me know if I can help with it.
@maxbrunsfeld Happy to. I punted on adding a test because I didn't understand how best to add to the git fixture—if you have any pointers, that'd be great. Either way, I'll dig in later today.
@maxbrunsfeld Updated the git fixture and added a test.
✨ Really nice work @artgillespie. This will go out in Atom 1.14.
Hey @artgillespie, I upgraded this in Atom, but then downgraded it because it caused the find-and-replace
test to fail. Would you be interested in looking into those test failures? The easiest way is:
npm link
from the scandal
directoryatom
repo to ~/github/atom
npm link scandal
from the atom
directoryfind-and-replace
repositoryfind-and-replace
in Atom and use the window:run-package-specs
command.I've been trying to figure out how to get atom to play nicely with bundle open
(see atom/find-and-replace#910) when the bundle directory is ignored and within the same directory as the repo, and it looks like my hopes are in conflict with the fix provided here.
Just to be clear, a simple example:
/home/user/project/.git
/home/user/project
/home/user/project/vendor/bundle
/home/user/project/.gitignore
includes vendor/bundle
When I run atom /home/user/project/vendor/bundle/dependency-0.0.1
, I hope to be able to search it independently of the fact that it technically lives within the /home/user/project
repository.
I believe I understand the mono-repo case, and I'm sympathetic to it, but it seems diametrically opposed to what I'm hoping for. Is there any interest in exploring a way to support both use cases?
Since I switched to atom a few weeks ago, I've found that our project's
node_modules
and other.gitignore
d paths are always searched, despite havingexcludeVcsIgnoredPaths
set totrue
in my config. I have to remember to add!node_modules, !dist, ...
, etc. to the file directory pattern.I dug into this and found that if your atom project is rooted in a directory other than the root of your git working directory (as is the case when you're working on a single project in a monorepo like ours)
PathFilter
sisPathIsExcludedByGit
will always return false. (because, in fact, it doesn't recognize the relativized path passed in byPathScanner
See related issue in atom core: https://github.com/atom/atom/issues/9175