{"thread":{"id":"42520","subject":"git check-ignore returns included files","startedAt":"2016-06-03T14:48:52Z","lastAt":"2016-06-03T14:48:52Z","messageCount":1,"participants":["Julien Cretin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"288254","messageId":"loom.20160603T164532-641@post.gmane.org","threadId":"42520","inReplyTo":null,"subject":"git check-ignore returns included files","fromName":"Julien Cretin","fromEmail":"git@ia0.eu","sentAt":"2016-06-03T14:48:52Z","receivedAt":"2016-06-03T14:48:52Z","isPatch":false,"sender":{"key":"git@ia0.eu","avatar":null},"body":"Hello,\n\nIs it expected for check-ignore to output included files (using a \"!\"\nprefix)?\n\nSteps to reproduce:\n\n    git init foo\n    cd foo\n    touch bar\n    echo '/bar\\n!/bar' > .gitignore\n    git add bar .gitignore\n    git commit -mbar\n    git check-ignore --verbose --no-index bar\n\nActual behavior:\n\n    .gitignore:2:!/bar\tbar\n\nexit code = 0\n\nExpected behavior:\n\nno output\n\nexit code = 1\n\nI tested with the next branch, which is currently at\n8a191e187a9dca3d786c0197f9610e627b4f4137.\n\nThe man page of check-ignore says:\n« For each pathname [...], check whether the file is excluded by\n.gitignore [...] and output the path if it is excluded. »\nand:\n« If the pattern contained a ! prefix or / suffix, it will be\npreserved in the output. »\n\nThe man page of gitignore says:\n« An optional prefix \"!\" which negates the pattern; any matching file\nexcluded by a previous pattern will become included again. »\n\nI am not sure how I should understand this situation.\n\nBest regards,\nJulien"}]}