{"thread":{"id":"53604","subject":"Possible regression in `git grep --untracked` pathspec matching in v2.27.0","startedAt":"2020-06-03T03:28:14Z","lastAt":"2020-06-05T18:46:50Z","messageCount":3,"participants":["John Millikin","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"399064","messageId":"CAJmdR_pG74x0Zn43MSm7zXNcoitqjjOy+WnhyGBW+oFjVFLbRQ@mail.gmail.com","threadId":"53604","inReplyTo":null,"subject":"Possible regression in `git grep --untracked` pathspec matching in v2.27.0","fromName":"John Millikin","fromEmail":"jmillikin@stripe.com","sentAt":"2020-06-03T03:28:00Z","receivedAt":"2020-06-03T03:28:14Z","isPatch":false,"sender":{"key":"jmillikin@stripe.com","avatar":null},"body":"In v2.26.2 and earlier, `git grep --untracked` with negative pathspec patterns\nwould filter out paths matching those patterns. In v2.27.0, this no longer works\nas expected.\n\nExample output:\n\n# v2.26.2 (good)\n$ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'\nquote.h\n$\n\n# v2.27.0 (bad)\n$ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'\nquote.c\nquote.h\n$\n\nI've bisected the change to commit 95c11ecc73f286e0a95d9591ae98f1221efe4633,\nwhich changed the handling of path matches in callers of `fill_directory()`.\n\nIt's not clear from git-grep(1) whether the old or new behavior is \"correct\",\nso I request that the fix include a clarification of expected semantics.\n\nThanks,\n- John Millikin\n"},{"id":"399076","messageId":"CABPp-BEPOn_JL1FDA-z1jfkfej4dEbbODkcmzNWwY7V-=WsMVw@mail.gmail.com","threadId":"53604","inReplyTo":"CAJmdR_pG74x0Zn43MSm7zXNcoitqjjOy+WnhyGBW+oFjVFLbRQ@mail.gmail.com","subject":"Re: Possible regression in `git grep --untracked` pathspec matching in v2.27.0","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-06-03T14:14:09Z","receivedAt":"2020-06-03T14:14:23Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"Hi,\n\nOn Tue, Jun 2, 2020 at 8:30 PM John Millikin <jmillikin@stripe.com> wrote:\n>\n> In v2.26.2 and earlier, `git grep --untracked` with negative pathspec patterns\n> would filter out paths matching those patterns. In v2.27.0, this no longer works\n> as expected.\n>\n> Example output:\n>\n> # v2.26.2 (good)\n> $ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'\n> quote.h\n> $\n>\n> # v2.27.0 (bad)\n> $ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'\n> quote.c\n> quote.h\n> $\n>\n> I've bisected the change to commit 95c11ecc73f286e0a95d9591ae98f1221efe4633,\n> which changed the handling of path matches in callers of `fill_directory()`.\n>\n> It's not clear from git-grep(1) whether the old or new behavior is \"correct\",\n> so I request that the fix include a clarification of expected semantics.\n>\n> Thanks,\n> - John Millikin\n\nOh, fun, an issue from _that_ series.  At least the commit you\nbisected to wasn't 8d92fb292706 (dir: replace exponential algorithm\nwith a linear one, 2020-04-01), though.\n\nThanks for the detailed report.  I'll try to get some time to take a\nlook later this week.\n\nElijah\n"},{"id":"399207","messageId":"CABPp-BEBKyE2NVfREov6k5qML5jryLjtzw=Y21EA=fHXA0PO5A@mail.gmail.com","threadId":"53604","inReplyTo":"CABPp-BEPOn_JL1FDA-z1jfkfej4dEbbODkcmzNWwY7V-=WsMVw@mail.gmail.com","subject":"Re: Possible regression in `git grep --untracked` pathspec matching in v2.27.0","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-06-05T18:46:35Z","receivedAt":"2020-06-05T18:46:50Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, Jun 3, 2020 at 7:14 AM Elijah Newren <newren@gmail.com> wrote:\n>\n> Hi,\n>\n> On Tue, Jun 2, 2020 at 8:30 PM John Millikin <jmillikin@stripe.com> wrote:\n> >\n> > In v2.26.2 and earlier, `git grep --untracked` with negative pathspec patterns\n> > would filter out paths matching those patterns. In v2.27.0, this no longer works\n> > as expected.\n> >\n> > Example output:\n> >\n> > # v2.26.2 (good)\n> > $ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'\n> > quote.h\n> > $\n> >\n> > # v2.27.0 (bad)\n> > $ ./git grep --untracked --files-with-matches -e '.' -- 'quote.*' ':!quote.c'\n> > quote.c\n> > quote.h\n> > $\n> >\n> > I've bisected the change to commit 95c11ecc73f286e0a95d9591ae98f1221efe4633,\n> > which changed the handling of path matches in callers of `fill_directory()`.\n> >\n> > It's not clear from git-grep(1) whether the old or new behavior is \"correct\",\n> > so I request that the fix include a clarification of expected semantics.\n> >\n> > Thanks,\n> > - John Millikin\n>\n> Oh, fun, an issue from _that_ series.  At least the commit you\n> bisected to wasn't 8d92fb292706 (dir: replace exponential algorithm\n> with a linear one, 2020-04-01), though.\n>\n> Thanks for the detailed report.  I'll try to get some time to take a\n> look later this week.\n\nFor those looking through the archives or threads later; see\nhttps://lore.kernel.org/git/pull.803.git.git.1591381428302.gitgitgadget@gmail.com/\nfor the fix.  Some day, maybe I'll tweak GitGitGadget to accept\nIn-Reply-To...\n"}]}