Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix ignore patterns in subdirectories with leading slashes #1354

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

emoses
Copy link
Contributor

@emoses emoses commented Jan 10, 2020

This addresses #1318 directly, although I think it might address some of the other ignore bugs as well.

Currently if you have an ignore file in a subdirectory "sub" with a pattern
like
/ignorethis
The directory sub/ignorethis will be ignored if you run ag from
within sub, but it won't be ignored if you run it from sub's parent.
that is

$ ag needle

will search files in sub/ignorethis, but

$ cd sub
$ ag needle

Will not. This is a bug

Currenetly if you have an ignore file in a subdirectory "sub" with a pattern
like
    /ignorethis
The directory sub/ignorethis will be ignored if you run ag from
within sub, but it won't be ignored if you run it from sub's parent.
that is

    $ ag needle

will search files in sub/ignorethis, but

    $ cd sub
    $ ag needle

Will not.  This is a bug
@ggreer ggreer merged commit de3e3c7 into ggreer:master Jan 10, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants