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

Re: Possible regression for sparse-checkout in git 2.27.0

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 5, 2020, 00:56 UTC
Message-ID
<xmqqtuzqnxdm.fsf@gitster.c.googlers.com>
In-Reply-To
<0aab7056-7176-01bc-ca7b-01356cbace4c@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 10 quoted lines
> The first is due to the .gitignore syntax. The syntax allows exact
> matches for _directories_ using a trailing slash "/". For example,
> we can match everything in A/B/C with the pattern
>
> 	A/B/C/
>
> This would match the files in A/B/C/ and its subdirectories, but will
> not match a file A/B/C.txt or A/B/C1/. There is no equivalent matching
> for files, so A/B/C _will_ match a file A/B/C and A/B/C.txt. Whether this
> matters to you or not depends on your file structure.

The pattern A/B/C _will_ match a file A/B/C and a directory A/B/C/, but I do not think it matches a file A/B/C.txt (or a path with any other suffix).

I suspect that for the purpose of your explanation, the pattern A/B/C does not have to match A/B/C.txt to cause trouble; the fact that it matches directory A/B/C would be sufficient, I guess.

Previous: Derrick StoleeNext: Derrick Stolee
Message 7 of 8 in “Possible regression for sparse-checkout in git 2.27.0”
  1. Shaun CaseJun 3, 2020
  2. Elijah NewrenJun 3, 2020
  3. Derrick StoleeJun 3, 2020
  4. Elijah NewrenJun 4, 2020
  5. Shaun CaseJun 4, 2020
  6. Derrick StoleeJun 5, 2020
  7. Junio C HamanoJun 5, 2020
  8. Derrick StoleeJun 5, 2020

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.