git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PROPOSAL] .gitignore syntax modification

From
MMaaartin <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.

Previous: Kevin BallardNext: Nguyen Thai Ngoc Duy
Message 4 of 13 in “[PROPOSAL] .gitignore syntax modification”
  1. Kevin BallardOct 8, 2010
  2. MaaartinOct 8, 2010
  3. Kevin BallardOct 9, 2010
  4. MaaartinOct 11, 2010
  5. Nguyen Thai Ngoc DuyOct 13, 2010
  6. Kevin BallardOct 13, 2010
  7. Jonathan NiederOct 13, 2010
  8. Kevin BallardOct 13, 2010
  9. Junio C HamanoOct 13, 2010
  10. Nguyen Thai Ngoc DuyOct 13, 2010
  11. Kevin BallardOct 15, 2010
  12. Nguyen Thai Ngoc DuyOct 15, 2010
  13. Kevin BallardOct 15, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.