From: David Greaves Date: Mon, 16 May 2005 16:05:01 GMT Subject: Re: [RFD] Ignore rules Message-ID: <4288C4AD.6060004@dgreaves.com> In-Reply-To: Matthias Urlichs wrote: >Hi, Jon Seymour wrote: > > > >>a. pushing the ignore logic into the core git tools such as git-ls-files >> >>b. including the current ignore .* rule as a default ignore rule that >>can be overridden by a .gitignore file >> >> > >I'd say YES to both. > >My preferred ignore file logic would be: > >- stop at first match (that's more efficient) > > more efficient true - but then surely 98% of the time you have to check _all_ patterns since files aren't generally ignored. And the ability to override earlier matches makes life much easier. So I say no shortcuts, last pattern to match decides ignore/accept status >- !pattern prevents exclusion of matching files >- bash-style shell globs, except that ... > - a pattern that starts with / is a regexp > - * doesn't cross directory boundaries, but ** does > > >- I don't need a per-repository (i.e. non-checked-in/propagated) > ignore file. > I agree. But for the sake of checking a couple of files it makes sense to define a complete set of locations. David --