{"thread":{"id":"19444","subject":"gitignore bug: including files in an excluded directoy does not work.","startedAt":"2009-05-23T09:18:25Z","lastAt":"2009-05-29T21:25:41Z","messageCount":3,"participants":["Florian Köberle","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"114507","messageId":"809f58722b8bdb916fa7816cd80d3833-EhVcXl1BQAtYRw8cBxcBWQEwfgFLV15YQUBGAEFbXkI3XV8WXlhwH1RQWEFeRENtXlhdQ1hSWAtfWg==-webmailer2@server05.webmailer.hosteurope.de","threadId":"19444","inReplyTo":null,"subject":"gitignore bug: including files in an excluded directoy does not work.","fromName":"Florian Köberle","fromEmail":"florian@fkoeberle.de","sentAt":"2009-05-23T09:18:25Z","receivedAt":"2009-05-23T09:18:25Z","isPatch":false,"sender":{"key":"florian@fkoeberle.de","avatar":null},"body":"steps to reproduce:\n\ngit init\necho /src/config > .gitignore\necho \\!/src/config/readme.txt >> .gitignore\nmkdir -p src/config\ntouch src/config/readme.txt\ngit add src\n\nexpected results:\ngit should add the readme.txt file\n\nactual result:\ngit doesn't add the readme.txt file\n\n\nadditional comments:\n\npre to the commit d6b8fc303b it was possible to archive the wished effect\nwith this .gitignore file:\n------------------\n/src/config/\n!/src/config/readme.txt\n------------------\nThe pre d6b8fc303b git fails to detect that it can exclude src/config.\nThus it checks the directory content and finds out that the readme.txt\nmatches both - the exclude and the include pattern.\n\n\ncommit d6b8fc303b389b026f2bf9918f6f83041488989b\nAuthor: Junio C Hamano <gitster pobox.com>\nDate:   Thu Jan 31 01:17:48 2008 -0800\n    gitignore(5): Allow \"foo/\" in ignore list to match directory \"foo\"\n\n\nBest regards,\nFlorian Köberle\n"},{"id":"114838","messageId":"4A1DA8A7.9030606@drmicha.warpmail.net","threadId":"19444","inReplyTo":"809f58722b8bdb916fa7816cd80d3833-EhVcXl1BQAtYRw8cBxcBWQEwfgFLV15YQUBGAEFbXkI3XV8WXlhwH1RQWEFeRENtXlhdQ1hSWAtfWg==-webmailer2@server05.webmailer.hosteurope.de","subject":"Re: gitignore bug: including files in an excluded directoy does not work.","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-05-27T20:55:03Z","receivedAt":"2009-05-27T20:55:03Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Florian Köberle venit, vidit, dixit 23.05.2009 11:18:\n> steps to reproduce:\n> \n> git init\n> echo /src/config > .gitignore\n> echo \\!/src/config/readme.txt >> .gitignore\n> mkdir -p src/config\n> touch src/config/readme.txt\n> git add src\n> \n> expected results:\n> git should add the readme.txt file\n> \n> actual result:\n> git doesn't add the readme.txt file\n> \n> \n> additional comments:\n> \n> pre to the commit d6b8fc303b it was possible to archive the wished effect\n> with this .gitignore file:\n> ------------------\n> /src/config/\n> !/src/config/readme.txt\n> ------------------\n> The pre d6b8fc303b git fails to detect that it can exclude src/config.\n> Thus it checks the directory content and finds out that the readme.txt\n> matches both - the exclude and the include pattern.\n\nThe change in behaviour was intentional. You get the desired effect using:\n\n/src/config/*\n!/src/config/readme.txt\n\nCheers,\nMichael\n"},{"id":"115053","messageId":"4A2052D5.80604@fkoeberle.de","threadId":"19444","inReplyTo":"4A1DA8A7.9030606@drmicha.warpmail.net","subject":"Re: gitignore bug: including files in an excluded directoy does not work.","fromName":"Florian Köberle","fromEmail":"florian@fkoeberle.de","sentAt":"2009-05-29T21:25:41Z","receivedAt":"2009-05-29T21:25:41Z","isPatch":false,"sender":{"key":"florian@fkoeberle.de","avatar":null},"body":"Michael J Gruber wrote:\n> Florian Köberle venit, vidit, dixit 23.05.2009 11:18:\n>   \n>> steps to reproduce:\n>>\n>> git init\n>> echo /src/config > .gitignore\n>> echo \\!/src/config/readme.txt >> .gitignore\n>> mkdir -p src/config\n>> touch src/config/readme.txt\n>> git add src\n>>\n>> expected results:\n>> git should add the readme.txt file\n>>\n>> actual result:\n>> git doesn't add the readme.txt file\n>>\n>>\n>> additional comments:\n>>\n>> pre to the commit d6b8fc303b it was possible to archive the wished effect\n>> with this .gitignore file:\n>> ------------------\n>> /src/config/\n>> !/src/config/readme.txt\n>> ------------------\n>> The pre d6b8fc303b git fails to detect that it can exclude src/config.\n>> Thus it checks the directory content and finds out that the readme.txt\n>> matches both - the exclude and the include pattern.\n>>     \n>\n> The change in behaviour was intentional. You get the desired effect using:\n>\n> /src/config/*\n> !/src/config/readme.txt\n>\n> Cheers,\n> Michael\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n>\n>   \nHello Michael,\n\nthanks for the explanation.\n\nBest regards,\nFlorian\n"}]}