{"thread":{"id":"1338","subject":"Re: [RFC] extending git-ls-files --exclude.","startedAt":"2005-07-25T22:06:18Z","lastAt":"2005-07-25T22:06:18Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"6443","messageId":"7vll3uh76t.fsf@assigned-by-dhcp.cox.net","threadId":"1338","inReplyTo":"20050725213456.23910.qmail@web26310.mail.ukl.yahoo.com","subject":"Re: [RFC] extending git-ls-files --exclude.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-07-25T22:06:18Z","receivedAt":"2005-07-25T22:06:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Marco Costalba <mcostalba@yahoo.it> writes:\n\n> This cumulative effect brakes local scoping of .gitignore files in \n> corresponding subdirectory.\n>\n> As example in a directory A we can have a .gitignore file with\n>\n> !foo.html\n> *.html\n>\n> because we want to special case 'that' foo.html in 'that'\n> directory.\n\nI guess that !foo.html I wrote was a bad example of special case\nnot being specific enough.  Saying \"!/foo.html\" should work\n[*1*], so I think \"cumulative effect _breaks_\" is a bit too strong\na word.\n\nHaving said that,...\n\n> This can be powerful and flexible but also prone to errors. \n\nWhile I also suspect it _might_ be prone to user errors, at\nleast to some classes of users, Catalin (and Peter as well I\nsuspect, although I may be mistaken by what he originally meant\nby \"cumulative\") seems to think it is OK.  As a developer of\nanother Porcelain (qgit), your input is as valuable as others,\nso...\n\nBTW, I am CC'ing git list because I saw you forwarded your\nentire message to the list as a quoted message form.  Please do\nnot do that.  I cannot distinguish a message like that with a\nmessage with nothing but quote and no original contents, which I\nnormally discard without even reading.\n\n[Footnote]\n\n*1* I just tried, and it seems to work.\n\n  $ rm -f .gitignore ppc/.gitignore\n  $ (echo '!/foo.bar'; echo '*.bar') >.gitignore\n  $ for i in foo.bar baz.bar; do date >$i; date >ppc/$i; done\n  $ git-ls-files --others --exclude-per-directory=.gitignore | grep '\\.bar'\n  foo.bar\n  $ rm -f .gitignore ppc/.gitignore\n"}]}