git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: John Millikin <jmillikin@stripe.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Possible regression in `git grep --untracked` pathspec matching in v2.27.0
Date: Wed, 3 Jun 2020 07:14:09 -0700	[thread overview]
Message-ID: <CABPp-BEPOn_JL1FDA-z1jfkfej4dEbbODkcmzNWwY7V-=WsMVw@mail.gmail.com> (raw)
In-Reply-To: <CAJmdR_pG74x0Zn43MSm7zXNcoitqjjOy+WnhyGBW+oFjVFLbRQ@mail.gmail.com>

Hi,

On Tue, Jun 2, 2020 at 8:30 PM John Millikin <jmillikin@stripe.com> wrote:
>
> In v2.26.2 and earlier, `git grep --untracked` with negative pathspec patterns
> would filter out paths matching those patterns. In v2.27.0, this no longer works
> as expected.
>
> Example output:
>
> # v2.26.2 (good)
> $ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'
> quote.h
> $
>
> # v2.27.0 (bad)
> $ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'
> quote.c
> quote.h
> $
>
> I've bisected the change to commit 95c11ecc73f286e0a95d9591ae98f1221efe4633,
> which changed the handling of path matches in callers of `fill_directory()`.
>
> It's not clear from git-grep(1) whether the old or new behavior is "correct",
> so I request that the fix include a clarification of expected semantics.
>
> Thanks,
> - John Millikin

Oh, fun, an issue from _that_ series.  At least the commit you
bisected to wasn't 8d92fb292706 (dir: replace exponential algorithm
with a linear one, 2020-04-01), though.

Thanks for the detailed report.  I'll try to get some time to take a
look later this week.

Elijah

  reply	other threads:[~2020-06-03 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03  3:28 Possible regression in `git grep --untracked` pathspec matching in v2.27.0 John Millikin
2020-06-03 14:14 ` Elijah Newren [this message]
2020-06-05 18:46   ` Elijah Newren

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='CABPp-BEPOn_JL1FDA-z1jfkfej4dEbbODkcmzNWwY7V-=WsMVw@mail.gmail.com' \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jmillikin@stripe.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 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).