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

ag -u won't search a submodule if its directory is in .gitignore #1511

Open
pacenathan opened this issue Mar 7, 2023 · 0 comments
Open

ag -u won't search a submodule if its directory is in .gitignore #1511

pacenathan opened this issue Mar 7, 2023 · 0 comments

Comments

@pacenathan
Copy link

I work with a git repo that has multiple submodules. For various reasons (important to us, so we can't just change it), some of those subomdule directories are listed in the repo's .gitignore file, on some branches. This somehow causes ag to fail to search into those submodule directories, even with -u.

Running this sequence of commands will demonstrate the issue, if your git install is configured to observe .gitignore inside the repo:

mkdir outer && cd outer && git init
git submodule add [email protected]:ggreer/the_silver_searcher.git
ag -ul valgrind
echo '/the_silver_searcher/' > .gitignore
ag -ul valgrind

The first ag -ul valgrind will find results; the second one will not.

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