Skip to content

Mismatch between this package and gitignore files #56

@arcanis

Description

@arcanis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions