git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Possible regression in `git grep --untracked` pathspec matching in v2.27.0
@ 2020-06-03  3:28 John Millikin
  2020-06-03 14:14 ` Elijah Newren
  0 siblings, 1 reply; 3+ messages in thread
From: John Millikin @ 2020-06-03  3:28 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-05 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-06-05 18:46   ` Elijah Newren

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).