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

Nested .gitignore is not correctly applied to sub directories #255

Open
gliviu opened this issue Aug 6, 2023 · 0 comments
Open

Nested .gitignore is not correctly applied to sub directories #255

gliviu opened this issue Aug 6, 2023 · 0 comments

Comments

@gliviu
Copy link

gliviu commented Aug 6, 2023

My directory structure:

.
├── .git
├── .gitignore        # a*
└── y
    ├── .gitignore    # !a2.txt
    ├── a2.txt        # Should not be ignored
    └── z
        └── a2.txt    # Should not be ignored.

Globby properly evaluates /y/a2.txt as included. However it fails when evaluating /z/a2.txt which is reported as ignored.

How to reproduce:
Unpack globby-issue.zip.

Run:

cd globby-issue
npm install
node main.js

Current output:

ignored  /.../globby-issue/test_dir/y/z/a2.txt
included /.../globby-issue/test_dir/y/a2.txt

Expected:

included  /.../globby-issue/test_dir/y/z/a2.txt
included /.../globby-issue/test_dir/y/a2.txt

Tested under linux with globby 13.2.2.
Looks similar to #146.

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