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

From: A Large Angry SCM <[email-masked]>
Date: Thu, 28 Jul 2005 12:04:31 -0400

Petr Baudis wrote:
>   I think this is wrong, and my brief experiments confirm that. I think
> that the actually useful semantics of exclusion would be for
> _subsequent_ exclusions, not preliminary ones. You generally don't say
> "I never want this ignored, but I want the rest of that ignored", but
> "I want that ignored, except this". This also gives you more
> flexibility:
> 
> 	*.html
> 	!f*.html
> 	fo*.html
> 
> would ignore *.html and fo*.html, but not any other f*.html filenames.
> But more importantly,
> 
> 	.gitignore: *.txt
> 	Documentation/.gitignore: !*.txt
> 
> will not work, which was the whole _point_ of the exclusion.

So you're arguing for "last match wins" versus "first match wins". I, 
personally, find the former more natural and easier to debug by hand.