{"action":"created","issue":{"url":"https://api.github.com/repos/jonschlinkert/micromatch/issues/13","labels_url":"https://api.github.com/repos/jonschlinkert/micromatch/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/jonschlinkert/micromatch/issues/13/comments","events_url":"https://api.github.com/repos/jonschlinkert/micromatch/issues/13/events","html_url":"https://github.com/jonschlinkert/micromatch/issues/13","id":61994811,"number":13,"title":"problem with re-include, excluded path","user":{"login":"tunnckoCore","id":5038030,"avatar_url":"https://avatars.githubusercontent.com/u/5038030?v=3","gravatar_id":"","url":"https://api.github.com/users/tunnckoCore","html_url":"https://github.com/tunnckoCore","followers_url":"https://api.github.com/users/tunnckoCore/followers","following_url":"https://api.github.com/users/tunnckoCore/following{/other_user}","gists_url":"https://api.github.com/users/tunnckoCore/gists{/gist_id}","starred_url":"https://api.github.com/users/tunnckoCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunnckoCore/subscriptions","organizations_url":"https://api.github.com/users/tunnckoCore/orgs","repos_url":"https://api.github.com/users/tunnckoCore/repos","events_url":"https://api.github.com/users/tunnckoCore/events{/privacy}","received_events_url":"https://api.github.com/users/tunnckoCore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-16T07:25:00Z","updated_at":"2015-03-16T07:42:44Z","closed_at":null,"body":"Because I still working on glob-fs idea :D lol\r\nActually it works on 80% of the common usage of gulp/glob-stream, fails only on complex fixtures, or no logical tests (look at you glob-stream, nah.. it have very very weird tests).\r\nBtw, talking about that, can you answer me why is needed [to ignore negate glob if it is first in given patterns](https://github.com/wearefractal/glob-stream/blob/master/test/main.js#L441-L457)?!\r\nNo logic for me... nor of matching libs (micromatch/minimatch/node-glob) have this behaving.. lol.\r\n\r\n### On topic\r\n```js\r\nvar micromatch = require('micromatch')\r\nvar multimatch = require('multimatch')\r\n\r\nvar paths = [\r\n  'foo/',\r\n  'foo/bar.js',\r\n  'foo/bar.md',\r\n  'foo/bar.txt',\r\n  'foo/bar.hbs',\r\n  'foo/bar.json',\r\n  'foo/bar.coffee',\r\n  'foo/bar/',\r\n  'foo/bar/bar.js',\r\n  'foo/bar/bar.md',\r\n  'foo/bar/bar.txt',\r\n  'foo/bar/bar.hbs',\r\n  'foo/bar/bar.json',\r\n  'foo/bar/bar.coffee',\r\n];\r\n\r\nvar patterns = [\r\n  'foo/**',\r\n  '!foo/',\r\n  '!foo/bar/',\r\n  '!foo/bar/*.{j*,txt,hbs}',\r\n  'foo/bar/*.json',\r\n];\r\n\r\nvar res = micromatch(paths, patterns);\r\n\r\nconsole.log(res, res.length);\r\n\r\n```\r\n**micromatch**, note there `foo/bar/bar.json` missing\r\n```\r\n[ 'foo/bar.js',\r\n  'foo/bar.md',\r\n  'foo/bar.txt',\r\n  'foo/bar.hbs',\r\n  'foo/bar.json',\r\n  'foo/bar.coffee',\r\n  'foo/bar/bar.md',\r\n  'foo/bar/bar.coffee' ] 8\r\n```\r\n**multimatch**, all is okey\r\n```\r\n[ 'foo/bar.js',\r\n  'foo/bar.md',\r\n  'foo/bar.txt',\r\n  'foo/bar.hbs',\r\n  'foo/bar.json',\r\n  'foo/bar.coffee',\r\n  'foo/bar/bar.md',\r\n  'foo/bar/bar.coffee',\r\n  'foo/bar/bar.json' ] 9\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/jonschlinkert/micromatch/issues/comments/81468324","html_url":"https://github.com/jonschlinkert/micromatch/issues/13#issuecomment-81468324","issue_url":"https://api.github.com/repos/jonschlinkert/micromatch/issues/13","id":81468324,"user":{"login":"tunnckoCore","id":5038030,"avatar_url":"https://avatars.githubusercontent.com/u/5038030?v=3","gravatar_id":"","url":"https://api.github.com/users/tunnckoCore","html_url":"https://github.com/tunnckoCore","followers_url":"https://api.github.com/users/tunnckoCore/followers","following_url":"https://api.github.com/users/tunnckoCore/following{/other_user}","gists_url":"https://api.github.com/users/tunnckoCore/gists{/gist_id}","starred_url":"https://api.github.com/users/tunnckoCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunnckoCore/subscriptions","organizations_url":"https://api.github.com/users/tunnckoCore/orgs","repos_url":"https://api.github.com/users/tunnckoCore/repos","events_url":"https://api.github.com/users/tunnckoCore/events{/privacy}","received_events_url":"https://api.github.com/users/tunnckoCore/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T07:42:44Z","updated_at":"2015-03-16T07:42:44Z","body":"or say we have this one\r\n```js\r\nvar patterns = [\r\n  'foo/**',               // include all filepaths (files and folders)\r\n  '!foo/',                // we dont want `foo/` in the list\r\n  '!foo/bar/',            // and also dont want `foo/bar/`\r\n  '!foo/bar/*',           // we dont want all files\r\n  'foo/bar/*.j*',         // except that are .js and .json\r\n];\r\n```"}}