From: A Large Angry SCM Date: Thu, 28 Jul 2005 16:04:31 GMT Subject: Re: [RFC] extending git-ls-files --exclude. Message-ID: <42E9020F.3080302@gmail.com> In-Reply-To: <20050728155210.GA17952@pasky.ji.cz> 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.