Closed letronje closed 10 years ago
Ag should respect .gitignore files, unless you pass -U
or -u
. That said, I've noticed that ag is ignoring my .gitignore in one of my projects too.
I think this is a bug in ag 0.21, probably related to https://github.com/ggreer/the_silver_searcher/issues/364. Could you confirm your ag version or try 0.20?
An aside: Ag makes a best-effort parsing of VCS ignore files. It assumes that version-control systems have essentially the same regexp syntax. There have been bugs (some fixed, some still exist: https://github.com/ggreer/the_silver_searcher/issues/168) where git-specific ignore features aren't supported in ag. I don't think that's the case here though.
I am on ag v0.20.0 . My gitignore has /log/*.log but ag still searches within log files. May be I should post this on ag instead of here ?
This has been fixed in v0.22.0. closing.
Ag, when used with projectile via C-c p A, seems to be searching log files as well. Does it honor the .gitignore file in a project ?
ack-and-a-half (C-c p a) skips logs files during searches.