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

Re: `*' gitignores and nested ignores

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 25, 2011, 08:18 UTC
Message-ID
<4D8C4FCF.5060900@viscovery.net>
In-Reply-To
<19851.6264.179471.935771@winooski.ccs.neu.edu>
Am 3/24/2011 11:10, schrieb Eli Barzilay:
Show 17 quoted lines
> According to the man page, a .gitignore file that is deeper has higher
> precedence, and a `!' line overrides lower precedence ignores.  I
> tried that, and it works in cases like the last "vmlinux*" example.
> 
> But it doesn't work if the lower precedence directory has a "*"
> pattern.  If the last example from the man page is changed to:
> 
>                $ cat .gitignore
>                *
>                $ ls arch/foo/kernel/vm*
>                arch/foo/kernel/vmlinux.lds.S
>                $ echo ´!/vmlinux*´ >arch/foo/kernel/.gitignore
> 
> then -- IIUC -- the second ignore should work the same, but it
> doesn't.  This also happens if the first pattern is "/*".
> 
> Is this a bug?
This has been discussed before, and IMNSHO, this is not a bug:
http://thread.gmane.org/gmane.comp.version-control.git/157190
-- Hannes
Previous: Eli BarzilayNext: Eli Barzilay
Message 2 of 3 in “`*' gitignores and nested ignores”
  1. Eli BarzilayMar 24, 2011
  2. Johannes SixtMar 25, 2011
  3. Eli BarzilayMar 25, 2011

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.