All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>, git@vger.kernel.org
Subject: Re: gitignore broken in git 1.7.0.1: slash checks leading dirs
Date: Fri, 05 Mar 2010 16:34:01 +0100	[thread overview]
Message-ID: <4B912469.8060705@viscovery.net> (raw)
In-Reply-To: <20100305151248.GA24748@progeny.tock>

Jonathan Nieder schrieb:
>  · 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. For example,
>    "Documentation/*.html" matches "Documentation/git.html" and
>    "tools/perf/Documentation/perf-diff.html" but not
>    "Documentation/ppc/ppc.html".

This is not correct: When the pattern "Documentation/*.html" matches
"Documentation/git.html", then it cannot match
"tools/perf/Documentation/perf-diff.html". This is because patterns that
contain a slash (after stripping a trailing slash) are anchored at the
directory that contains the .gitignore.

Said pattern would match the latter name only if it appeared in
tools/perf/.gitignore (but in this case it wouldn't match the former name,
of course).

-- Hannes

  parent reply	other threads:[~2010-03-05 15:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05  8:55 gitignore broken in git 1.7.0.1: slash checks leading dirs Jiri Slaby
2010-03-05  9:05 ` Johannes Sixt
2010-03-05  9:07   ` Jiri Slaby
2010-03-05  9:16     ` Johannes Sixt
2010-03-05  9:20       ` [PATCH 1/1] gitignore: do not ignore include/linux/ Jiri Slaby
2010-03-05 10:43         ` Jakub Narebski
2010-03-05 15:19           ` Jiri Slaby
2010-03-10 10:07             ` David Rientjes
2010-03-10 10:11               ` Américo Wang
2010-03-10 10:25                 ` David Rientjes
2010-03-08  2:08         ` Américo Wang
2010-03-05  9:29       ` gitignore broken in git 1.7.0.1: slash checks leading dirs Jiri Slaby
2010-03-05 17:25         ` Jonathan Nieder
2010-03-05 19:30           ` Jiri Slaby
2010-03-05 15:12   ` Jonathan Nieder
2010-03-05 15:15     ` Jonathan Nieder
2010-03-05 15:34     ` Johannes Sixt [this message]
2010-03-05 15:56       ` [PATCH] gitignore.5: Clarify matching rules Jonathan Nieder
2010-03-05 17:01   ` gitignore broken in git 1.7.0.1: slash checks leading dirs Junio C Hamano

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=4B912469.8060705@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=jirislaby@gmail.com \
    --cc=jrnieder@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.