threads / rfc / 1338

Re: [RFC] extending git-ls-files --exclude.

Subject: Re: [RFC] extending git-ls-files --exclude.

## tl;dr

One message between Jul 25, 2005 and Jul 25, 2005.

replies: 0people: 1as markdown or json

Junio C Hamano· Jul 25, 2005, 22:06 UTC · lore
Marco Costalba <mcostalba@yahoo.it> writes:
Show 10 quoted lines
> This cumulative effect brakes local scoping of .gitignore files in 
> corresponding subdirectory.
>
> As example in a directory A we can have a .gitignore file with
>
> !foo.html
> *.html
>
> because we want to special case 'that' foo.html in 'that'
> directory.

I guess that !foo.html I wrote was a bad example of special case not being specific enough. Saying "!/foo.html" should work [*1*], so I think "cumulative effect _breaks_" is a bit too strong a word.

Having said that,...
> This can be powerful and flexible but also prone to errors. 

While I also suspect it _might_ be prone to user errors, at least to some classes of users, Catalin (and Peter as well I suspect, although I may be mistaken by what he originally meant by "cumulative") seems to think it is OK. As a developer of another Porcelain (qgit), your input is as valuable as others, so...

BTW, I am CC'ing git list because I saw you forwarded your entire message to the list as a quoted message form. Please do not do that. I cannot distinguish a message like that with a message with nothing but quote and no original contents, which I normally discard without even reading.

[Footnote]
*1* I just tried, and it seems to work.
  $ rm -f .gitignore ppc/.gitignore
  $ (echo '!/foo.bar'; echo '*.bar') >.gitignore
  $ for i in foo.bar baz.bar; do date >$i; date >ppc/$i; done
  $ git-ls-files --others --exclude-per-directory=.gitignore | grep '\.bar'
  foo.bar
  $ rm -f .gitignore ppc/.gitignore

← back to recent threads