{"thread":{"id":"44051","subject":"Git Ignore Exception bug","startedAt":"2016-09-09T21:39:07Z","lastAt":"2016-09-14T11:26:26Z","messageCount":2,"participants":["Nathan Williams","Dennis Kaarsemaker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"301570","messageId":"CAC5iUd2mS1n1=sRB=Bs6tn3L3raAXrZaEcs765UFtQZB9XZuYg@mail.gmail.com","threadId":"44051","inReplyTo":null,"subject":"Git Ignore Exception bug","fromName":"Nathan Williams","fromEmail":"nwilliams@sofi.org","sentAt":"2016-09-09T21:39:02Z","receivedAt":"2016-09-09T21:39:07Z","isPatch":false,"sender":{"key":"nwilliams@sofi.org","avatar":null},"body":"it ignore doesn't seem to be working properly when adding exceptions.\n\nEnvironment:\n\nMac, running latest El Capitan (10.11.6)\n\n% git --version\ngit version 2.9.0\n\n-----------cut here-------------\n#!/bin/sh\nTEMP=mktemp\n\n# Create a temporary repo\nmkdir repo\ncd repo\n\ngit init\n\necho \"foo/*\" >> .gitignore\necho \"!foo/bar\" >> .gitignore\ngit add .gitignore\ngit commit -m \"Ignore file with exceptions\"\n\n# Create the directory structure\nmkdir foo\nmkdir foo/bar\n\n# Create files to be ignored\ntouch foo/1\ntouch foo/2\n\n# Create files that should be identified\ntouch foo/bar/a\ntouch foo/bar/b\n\n# Should ignore foo and indicate that all the files in foo/bar are un-committed\ngit status\n\n# Move back to the regular directory\ncd ..\n-----------cut here-------------\n\nExpected results\n% git st\nOn branch master\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n\n        foo/bar/\n\n\nNate\n"},{"id":"301902","messageId":"1473852376.30531.20.camel@kaarsemaker.net","threadId":"44051","inReplyTo":"CAC5iUd2mS1n1=sRB=Bs6tn3L3raAXrZaEcs765UFtQZB9XZuYg@mail.gmail.com","subject":"Re: Git Ignore Exception bug","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2016-09-14T11:26:16Z","receivedAt":"2016-09-14T11:26:26Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On vr, 2016-09-09 at 15:39 -0600, Nathan Williams wrote:\n> it ignore doesn't seem to be working properly when adding exceptions.\n\n>8 -- snip testcase\n\n> Expected results\n> % git st\n> On branch master\n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n> \n>         foo/bar/\n\nThat expectation is wrong, it should show foo/. And indeed it does\n(tested with 2.9.0 and 2.10.0-rc1)\n\n$ sh -x testscript\n+ rm -rf repo\n+ mkdir repo\n+ cd repo\n+ git init\nInitialized empty Git repository in /home/dennis/code/git/repo/.git/\n+ echo foo/*\n+ echo !foo/bar\n+ git add .gitignore\n+ git commit -m Ignore file with exceptions\n[master (root-commit) 7e1b82a] Ignore file with exceptions\n 1 file changed, 2 insertions(+)\n create mode 100644 .gitignore\n+ mkdir foo\n+ mkdir foo/bar\n+ touch foo/1\n+ touch foo/2\n+ touch foo/bar/a\n+ touch foo/bar/b\n+ git status\nOn branch master\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n\n\tfoo/\n\nnothing added to commit but untracked files present (use \"git add\" to track)\n-- \nDennis Kaarsemaker\nhttp://www.kaarsemaker.net\n\n\n"}]}