From: dana <dana@dana.is>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Matthieu Moy <Matthieu.Moy@imag.fr>,
Michael Haggerty <mhagger@alum.mit.edu>,
Andrew Gallant <jamslam@gmail.com>
Subject: Re: [BUG] gitignore documentation inconsistent with actual behaviour
Date: Sat, 13 Oct 2018 21:14:19 -0500 [thread overview]
Message-ID: <E7F1D716-D8DE-40DA-AE3E-740BD28AB677@dana.is> (raw)
In-Reply-To: <87bm80eo6h.fsf@evledraar.gmail.com>
On 11 Oct 2018, at 06:08, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>Our matching function comes from rsync originally, whose manpage says:
>
> use ’**’ to match anything, including slashes.
>
>I believe this is accurate as far as the implementation goes. You can
>also see the rather exhaustive tests here:
>https://github.com/git/git/blob/master/t/t3070-wildmatch.sh
Thanks. The tests are a little hard to follow at first glance, so i guess i'd
have to study them more to see what the semantics actually are. When i tested it
briefly it didn't seem like it was behaving as you described, but maybe i wasn't
paying close enough attention. In any case, i'm sure these will be useful.
On 11 Oct 2018, at 06:08, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>The reason I'm on this tangent is to ask whether if such a thing
>existed, if it's something you can see something like ripgrep
>using. I.e. ask git given its .gitignore and .gitattributes what thing
>matches one of its pathspecs instead of carrying your own bug-compatible
>implementation.
My impression is that it probably isn't practical to use something like that as
ripgrep's main pattern-matching facility — for one thing there are performance
concerns, and for another it makes it dependent on git for some of its core
functionality (and it's not a git-specific tool). But i was going to say that
it'd be useful for testing, and when i e-mailed Andrew (the main ripgrep dev)
about this he said the same. I've CCed him on this message in case he has
anything to add.
dana
next prev parent reply other threads:[~2018-10-14 2:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 10:19 [BUG] gitignore documentation inconsistent with actual behaviour dana
2018-10-11 10:37 ` dana
2018-10-11 11:08 ` Ævar Arnfjörð Bjarmason
2018-10-14 2:14 ` dana [this message]
2018-10-14 12:15 ` Duy Nguyen
2018-10-14 22:56 ` Junio C Hamano
2018-10-15 15:27 ` Duy Nguyen
2018-10-20 5:26 ` Duy Nguyen
2018-10-20 5:53 ` dana
2018-10-20 6:03 ` Duy Nguyen
2018-10-20 6:26 ` dana
2018-10-27 8:48 ` [PATCH] wildmatch: change behavior of "foo**bar" in WM_PATHNAME mode Nguyễn Thái Ngọc Duy
2018-10-28 6:25 ` Torsten Bögershausen
2018-10-28 6:35 ` Duy Nguyen
2018-10-29 2:28 ` Junio C Hamano
2018-10-29 13:24 ` Ævar Arnfjörð Bjarmason
2018-10-29 15:53 ` Duy Nguyen
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=E7F1D716-D8DE-40DA-AE3E-740BD28AB677@dana.is \
--to=dana@dana.is \
--cc=Matthieu.Moy@imag.fr \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=jamslam@gmail.com \
--cc=mhagger@alum.mit.edu \
/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).