git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Lichtenheld <djpig@debian.org>
To: Josh Triplett <josh@freedesktop.org>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: Re: [PATCH] Create a new manpage for the gitignore format, and reference it elsewhere
Date: Sat, 2 Jun 2007 12:56:48 +0200	[thread overview]
Message-ID: <20070602105648.GX3242@planck.djpig.de> (raw)
In-Reply-To: <4660BF65.3000605@freedesktop.org>

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
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"

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.

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/

  reply	other threads:[~2007-06-02 10:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01 22:20 [PATCH] Create a new manpage for the gitignore format, and reference it elsewhere Josh Triplett
2007-06-01 23:47 ` Frank Lichtenheld
2007-06-02  0:52   ` Josh Triplett
2007-06-02 10:56     ` Frank Lichtenheld [this message]
2007-06-02 16:54       ` Josh Triplett
2007-06-02 18:24         ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2007-06-02 17:08 Josh Triplett
2007-06-02  1:01 Josh Triplett
2007-06-01 20:49 Josh Triplett
2007-06-01 21:46 ` Junio C Hamano
2007-06-01 22:18   ` Josh Triplett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070602105648.GX3242@planck.djpig.de \
    --to=djpig@debian.org \
    --cc=git@vger.kernel.org \
    --cc=josh@freedesktop.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).