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

Re: [PATCH 2/2] gitignore.txt: clarify recursive nature of excluded directories

From
Jeff King <peff@peff.net>
Date
Nov 7, 2013, 20:57 UTC
Message-ID
<20131107205732.GA16564@sigill.intra.peff.net>
In-Reply-To
<527BF7A4.6070203@gmail.com>
On Thu, Nov 07, 2013 at 09:27:16PM +0100, Karsten Blees wrote:
Show 16 quoted lines
> > How about:
> > 
> >   It is not possible to re-include a file if a parent directory of that
> >   file is excluded. Once git considers a directory excluded, it does not
> >   descend into the directory to consider its contents further.
> > 
> 
> Hmm...an unsuspecting reader might still assume that it works in
> top-level .gitignore, given the precendence rules above...
> 
> How about this:
> 
>    It is not possible to re-include a file if a parent directory of that
>    file is excluded. Git doesn't list excluded directories for performance
>    reasons, so any patterns on contained files have no effect, no matter
>    where they are defined.
Yeah, I like that.
-Peff
Previous: Karsten BleesNext: Karsten Blees
Message 9 of 11 in “Improve gitignore documentation wrt excluded directories”
  1. 0/2 Improve gitignore documentation wrt excluded directoriesKarsten Blees, Nov 7, 2013
  2. 1/2 gitignore.txt: fix documentation of "**" patternsKarsten Blees, Nov 7, 2013
  3. Junio C HamanoNov 7, 2013
  4. 2/2 gitignore.txt: clarify recursive nature of excluded directoriesKarsten Blees, Nov 7, 2013
  5. Junio C HamanoNov 7, 2013
  6. Junio C HamanoNov 7, 2013
  7. Jeff KingNov 7, 2013
  8. Karsten BleesNov 7, 2013
  9. Jeff KingNov 7, 2013
  10. 2/2 gitignore.txt: clarify recursive nature of excluded directoriesKarsten Blees, Nov 7, 2013
  11. Junio C HamanoNov 7, 2013

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.