{"thread":{"id":"47037","subject":"Discrepancy between git-check-ignore and git-status for negated pattern","startedAt":"2017-10-26T18:49:30Z","lastAt":"2017-10-26T18:49:30Z","messageCount":1,"participants":["Guido Flohr"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"331106","messageId":"60C66671-B124-4933-AC91-31D9A202D11D@cantanea.com","threadId":"47037","inReplyTo":null,"subject":"Discrepancy between git-check-ignore and git-status for negated pattern","fromName":"Guido Flohr","fromEmail":"guido.flohr@cantanea.com","sentAt":"2017-10-26T18:40:49Z","receivedAt":"2017-10-26T18:49:30Z","isPatch":false,"sender":{"key":"guido.flohr@cantanea.com","avatar":null},"body":"This .gitignore file does not work as expected with git-check-ignore:\n\n    *.o\n    !a.o\n\nIt seems that “git check-ignore a.o” ignores that “a.o” was re-included.  This is what happens:\n\n    $ git --version\n    git version 2.15.0.rc2.48.g4e40fb302\n    $ mkdir repo\n    $ cd repo\n    $ git init\n    Initialized empty Git repository in /path/to/repo/.git/\n    $ echo '*.o' >.gitignore\n    $ echo '!a.o' >>.gitignore\n    $ >a.o\n    $ >b.o\n    $ git check-ignore a.o b.o\n    a.o\n    b.o\n    $ git status --short\n    ?? a.o\n\nAccording to git-check-ignore, “a.o” is ignored.  According to git-status, it is not.\n\nIs that a bug or did I miss something because of my limited search capabilities?\n\nTested on a Mac with current master from git.  The 2.13.4 binary from Mac Ports exhibits the same behavior. \n\nThanks!\n"}]}