Skip to content
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

Add per-directory .gitignore support #1527

Open
gene-pavlovsky opened this issue Jul 28, 2023 · 0 comments
Open

Add per-directory .gitignore support #1527

gene-pavlovsky opened this issue Jul 28, 2023 · 0 comments

Comments

@gene-pavlovsky
Copy link

gene-pavlovsky commented Jul 28, 2023

In a git repo, you may have a top-level .gitignore file at the root of the repo, and individual .gitignore files in subdirs.
It seems that ag only uses the nearest .gitignore it can find, and then doesn't respect the higher level ones.
So if I'm in a subdir that has a .gitignore, then the one from the repo root dir is ignored.
In my opinion, ag should identify if it's inside a git repo, start from the current dir, traverse to the root dir of the repo, concatenating the contents of all .gitignore files found along the way, and using this aggregate ignore list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant