Re: [PROPOSAL] .gitignore syntax modification
- From
- Maaartin <grajcar1@seznam.cz>
- Date
- Oct 11, 2010, 23:46 UTC
- Message-ID
- <loom.20101012T013931-754@post.gmane.org>
- In-Reply-To
- <FD4E6D0A-34E6-4FC4-AA7A-327E07AB58D4@sb.org>
Kevin Ballard <kevin <at> sb.org> writes:
Show 9 quoted lines
> On Oct 8, 2010, at 2:58 PM, Maaartin wrote: > That's not the right layout. I'd have to do > > *.xcodeproj/* > !*.xcodeproj/project.pbxproj > */*.xcodeproj/* > !*/*.xcodeproj/project.pbxproj > > And so on, once for each possible level of nesting.
Sorry, that's was I meant, I was too sloppy/tired/stupid when writing this.
> ... The problem I'm talking about is > simply that you cannot write a pattern that includes a slash and have that
pattern match at any nesting level.
I see I wrong again. At least I learned something.
> Upon further reflection, if we stick with platform-provided fnmatch() we
don't have to special-case a
> prefixed **/. We could simply define patterns as always matching in that way,
and you can use the
> already-existing prefixed / to root it at the current level. So if my pattern
looks like
> > *.xcodeproj/* > > Then it will attempt to match this pattern against the last 2 path components
of any path rooted in this
> directory. It can simply count the slashes to determine the number of path
components. If I really want it
> to just match *.xcodeproj files in the current directory then my pattern
should look like
> > /*.xcodeproj/*
IMHO, this is how it should work, simple and consequent. Sorry for clobbering this thread by my mistakes.