All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Loskutov <loskutov@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Duy Nguyen <pclouds@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Single brackets matching in .gitignore rules
Date: Mon, 28 Sep 2015 19:46:10 +0200	[thread overview]
Message-ID: <4259524.1vtm9ffbuH@pinguin> (raw)
In-Reply-To: <xmqq7fnae92a.fsf@gitster.mtv.corp.google.com>

On Monday 28 September 2015 10:40 Junio C Hamano wrote:
> Duy Nguyen <pclouds@gmail.com> writes:
> 
> > This is already answered. I just want to add that C Git has stopped
> > using system fnmatch for some time (part of the reason is system
> > fnmatch behaves differently in corner cases). If you don't mind C,
> > have a look at dowild() in wildmatch.c, or t/t3070-wildmatch.sh for
> > some corner cases (but your cases aren't there, may be worth adding
> > too)
> 
> What exactly are you suggesting to "fix", though?  Barf when an
> unmatched ] appears as a part of the pattern, instead of taking it
> literally?

I would rather treat the opened but unmatched [ bracket literally, so that it works similar like ]. 
Originally I've implemented this "symmetrical" behavior in JGit without to know that unmatched [ and ] have different behavior in C Git.

-- 
Kind regards,
google.com/+AndreyLoskutov

  reply	other threads:[~2015-09-28 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-26 22:01 Single brackets matching in .gitignore rules Andrey Loskutov
2015-09-27  8:58 ` Andreas Schwab
2015-09-27 16:35   ` Andrey Loskutov
2015-09-28 13:15 ` Duy Nguyen
2015-09-28 17:40   ` Junio C Hamano
2015-09-28 17:46     ` Andrey Loskutov [this message]
2015-09-28 18:04       ` 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=4259524.1vtm9ffbuH@pinguin \
    --to=loskutov@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@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.