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

Re: [PATCH] Create a new manpage for the gitignore format, and reference it elsewhere

From
Josh Triplett <josh@freedesktop.org>
Date
Jun 2, 2007, 16:54 UTC
Message-ID
<4661A0BC.2060201@freedesktop.org>
In-Reply-To
<20070602105648.GX3242@planck.djpig.de>
Frank Lichtenheld wrote:
Show 20 quoted lines
> On Fri, Jun 01, 2007 at 05:52:53PM -0700, Josh Triplett wrote:
>> Frank Lichtenheld wrote:
>>> On Fri, Jun 01, 2007 at 03:20:52PM -0700, Josh Triplett wrote:
>>>> + - Otherwise, git treats the pattern as a shell glob suitable
>>>> +   for consumption by fnmatch(3) with the FNM_PATHNAME flag: any
>>>> +   slash in the pattern must match a slash in the pathname.  For
>>>> +   example, "Documentation/\*.html" matches
>>>> +   "Documentation/git.html" but not "ppc/ppc.html".  A leading
>>>> +   slash matches the beginning of the pathname; for example,
>>>> +   "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
>>> I realise this is copy&paste but shouldn't that read:
>>> "Documentation/\*.html" matches "Documentation/git.html"
>>> but not "Documentation/ppc/ppc.html"
>>> ?
>> I don't know.  Neither file seems to exist in current Git.
> 
> The point I was trying to make is that "Documentation/*.html" _of
> course_ doesn't match ppc/ppc.html. What we try to tell the user here
> is that * doesn't match /
> So I think it should definetly read Documentation/ppc/ppc.html
Ah, I understand your point now.
Show 6 quoted lines
> FWIW, I find the sentence
> "any slash in the pattern must match a slash in the pathname"
> very confusing too. The sentence in fnmatch(3) is much more precise:
> "match a slash in string only with a slash in pattern and not by an
> asterisk (*) or a question mark (?) metacharacter, nor by a bracket
> expression ([]) containing a slash"
I like that better as well.
> Anyway, if you prefer (and if it is okay with Junio) I can send a
> patch of my own for this single issue to not hinder the commit of
> your big patch as the issue is equally present in the old and the
> new text.

Now that I understand the issue you raised, I can easily fix it and send a revised patch. Expect one momentarily.

- Josh Triplett
Previous: Frank LichtenheldNext: Junio C Hamano
Message 5 of 6 in “Create a new manpage for the gitignore format, and reference it elsewhere”
  1. Create a new manpage for the gitignore format, and reference it elsewhereJosh Triplett, Jun 1, 2007
  2. Frank LichtenheldJun 1, 2007
  3. Josh TriplettJun 2, 2007
  4. Frank LichtenheldJun 2, 2007
  5. Josh TriplettJun 2, 2007
  6. Junio C HamanoJun 2, 2007

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.