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

Re: Q: .gitignore and asterisk "*"

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 3, 2026, 17:13 UTC
Message-ID
<xmqqzevpald4.fsf@gitster.g>
In-Reply-To
<20261103073317.DATcL%taahol@utu.fi>
Tuomas Ahola <taahol@utu.fi> writes:
> Junio C Hamano <gitster@pobox.com> wrote:
>
>> "Windl, Ulrich" <u.windl@ukr.de> writes:

Please trim the lines that do not have any relevance to what you are going to comment on from your quoted material.

Show 10 quoted lines
>> - - An asterisk "`*`" matches anything except a slash.
>> -   The character "`?`" matches any one character except "`/`".
>> -   The range notation, e.g. `[a-zA-Z]`, can be used to match
>> -   one of the characters in a range. See fnmatch(3) and the
>> -   FNM_PATHNAME flag for a more detailed description.
>> + - An asterisk "`*`" matches string of any length, and a question mark
>
> It's not unreasonable at all to call the empty string "a string of no length",
> so it is still a bit ambiguous whether it qualifies as a string of any length.
> I would suggest s/of any length/of length of zero or more/.

A string of no length falls within the set of strings of any length, so I do not see any ambiguity there.

"A string of length of zero or more" is a roundabout way to say "any string" as by definition there is no string of negative length. Perhaps that is good enough?

Previous: Windl, UlrichNext: Tuomas Ahola
Message 5 of 6 in “Q: .gitignore and asterisk "*"”
  1. Windl, UlrichOct 30, 2026
  2. Junio C HamanoOct 30, 2026
  3. Tuomas AholaNov 3, 2026
  4. Windl, UlrichNov 3, 2026
  5. Junio C HamanoNov 3, 2026
  6. Tuomas AholaNov 3, 2026

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.