-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.gitignore not taken into account when the current working directory is a subdirectory #144
Comments
I'm working on a patch for this |
Just ran into this…be great to see it included! |
One potential problem is that it doesn't stop when it hits a .gitignore, and it will catch every parent .gitignore, which isn't how git behaves. |
Git does read every parent .gitignore until it reaches the directory with .git. |
It doesn't read beyond that, though, which is what I was trying to get On Mon, Mar 11, 2013 at 7:57 AM, David D Lowe notifications@github.comwrote:
|
Any news on this patch? I just realized that Ag ignore list is not the same as git. It is probably linked to this issue. Does Ag also read the global ignore file from |
Fix ggreer#287 but doesn't fix ggreer#144
Fix ggreer#287 but doesn't fix ggreer#144
Fix ggreer#287 but doesn't fix ggreer#144
Fix ggreer#287 but doesn't fix ggreer#144
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Attempt to fix issue 275 Only increment the scandir baton when recursing Fix ggreer#285 but needs testing for more complex directories Check ignore paths based on correct baton level Fix ggreer#287 but doesn't fix ggreer#144 Stop comparing terminating NULL in path string Might save a few cycles... Handle absolute .gitignore patterns properly Pattern /b/c/d should ignore /b/c/d but not a/b/c/d
Any news on this issue? I'd love to see it resolved. This issue makes ag hard to work with in large repositories. |
I'd recommend just using |
@sandermarechal @tremby Or A crappy workaround with ag is to make Can't we just re-use the .gitignore-finding and parsing code from the |
The thing is, |
At the risk of being a broken record, give |
Whats the status of this issue? Is this fixed already or still WIP? This would really help since i end up always searching thru all my build files etc. |
If you're in a pinch, you can use |
Here's a workaround using a shell bash function. It checks if you are currently in a git repo and if so, gets the .gitignore. If not, it passes an empty string to
|
If I run ag in the directory that contains .gitignore, it reads it and takes it into account. However, if I run ag in a subdirectory of the git working directory, it doesn't take it into account any more.
The text was updated successfully, but these errors were encountered: