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

Mismatch between this package and gitignore files #56

Closed
arcanis opened this issue Aug 13, 2019 · 2 comments
Closed

Mismatch between this package and gitignore files #56

arcanis opened this issue Aug 13, 2019 · 2 comments
Labels

Comments

@arcanis
Copy link

arcanis commented Aug 13, 2019

Given the following reproduction:

mkdir /tmp/ignoretest
cd /tmp/ignoretest

mkdir foo
touch foo/bar.js

echo > .gitignore <<'EOT'
/*/
!/foo/
EOT

git init
git add .
git status

The foo/bar.js file got added to the repository. Doing the same on ignore, however:

const ignore = require(`ignore`);

ignore().add([
  `/*/`,
  `!/foo/`,
]).ignores(`foo/bar.js`) // true
@kaelzhang
Copy link
Owner

gitignore rules changes in 2.22.1!

@kaelzhang
Copy link
Owner

landed in 5.1.3

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

Successfully merging a pull request may close this issue.

2 participants