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

Re: [PATCH] docs: .gitignore in parents is current repo only

From
Andrew Berry <andrew@furrypaws.ca>
Date
Jul 5, 2021, 17:30 UTC
Message-ID
<889D9AD1-1114-49B4-ADB0-BF78160743E4@furrypaws.ca>
In-Reply-To
<b9da43a8-897b-7cce-ecbc-ea56078f0f09@gmail.com>
On 2 Jul 2021, at 20:06, Junio C Hamano wrote:
> I would have thought that "up to the toplevel of the work
> tree" would be sufficiently clear where the upward traversal of the
> directories ends, i.e. at the repository boundary.

Seems reasonable. What if we move that note to come after "any parent directory"?

On 2 Jul 2021, at 20:21, Bagas Sanjaya wrote:
> So for example I have `something/foo` in ../.gitignore, but .gitignore 
> (in current directory `something`) has `foo`. Is .gitignore from 
> current directory or ../.gitignore takes effect?

In this case, both rules resolve to the same path, so I don't think it matters? But in practice I'd expect it to be `something/.gitignore`, since you can negate the pattern from the parent ignore file.

> Also s/toplevel/top level/

That showed up in the diff due to word wrapping. If no other changes are accepted, I'll file a followup after to get this fixed on it's own.

Previous: Bagas SanjayaNext: Junio C Hamano
Message 4 of 16 in “docs: .gitignore in parents is current repo only”
  1. docs: .gitignore in parents is current repo onlyAndrew Berry, Jul 2, 2021
  2. Junio C HamanoJul 3, 2021
  3. Bagas SanjayaJul 3, 2021
  4. Andrew BerryJul 5, 2021
  5. Junio C HamanoJul 5, 2021
  6. Andrew BerryJul 5, 2021
  7. Junio C HamanoJul 6, 2021
  8. docs: .gitignore parsing is to the top of the repoAndrew Berry, Jul 6, 2021
  9. docs: .gitignore parsing is to the top of the repoAndrew Berry, Jul 6, 2021
  10. Junio C HamanoJul 6, 2021
  11. Junio C HamanoJul 7, 2021
  12. Andrew BerryJul 7, 2021
  13. Junio C HamanoJul 7, 2021
  14. Andrew BerryJul 18, 2021
  15. Junio C HamanoJul 19, 2021
  16. Junio C HamanoJul 6, 2021

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.