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

Re: [PATCH] Documentation: enhance gitignore whitelist example

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 5, 2011, 21:51 UTC
Message-ID
<7vzko4l64a.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4D9B8862.1050605@redhat.com>
Eric Blake <eblake@redhat.com> writes:
Show 17 quoted lines
> On 04/05/2011 03:15 PM, Johannes Sixt wrote:
>>>> @@ -87,7 +89,8 @@ PATTERN FORMAT
>>>>
>>>>   - Otherwise, git treats the pattern as a shell glob suitable
>>>>     for consumption by fnmatch(3) with the FNM_PATHNAME flag:
>>>> -   wildcards in the pattern will not match a / in the pathname.
>>>> +   wildcards in the pattern will not match a / in the pathname,
>>>> +   and do not ignore files with a leading . in the pathname.
>> 
>> I don't think this is correct. * matches .gitignore. I tried it.
>
> That was my point.  * _does_ match .gitignore, even though for normal
> shell globs, FNM_PERIOD is set and * does not match .gitignore.  That
> is, while in the shell 'dir/*' only matches non-dot files, in .gitignore
> it matches all files including dot-files.
>
> Any ideas for a better way to word that?

Instead of "and do not ignore files with a leading", say "but will match a dot '.'". You are talking about the rule for wildcards to match or not to match the pathname and there is no room for the word "ignore" to come into play in this sentence.

Previous: Eric BlakeNext: Junio C Hamano
Message 7 of 9 in “Documentation: enhance gitignore whitelist example”
  1. Documentation: enhance gitignore whitelist exampleEric Blake, Apr 5, 2011
  2. Jonathan NiederApr 5, 2011
  3. Johannes SixtApr 5, 2011
  4. Eric BlakeApr 5, 2011
  5. Jonathan NiederApr 5, 2011
  6. Eric BlakeApr 5, 2011
  7. Junio C HamanoApr 5, 2011
  8. Junio C HamanoApr 5, 2011
  9. Junio C HamanoApr 5, 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.