Re: [PATCH v2 3/3] Use the newly-introduced regexec_buf() function
- From
Jeff King <peff@peff.net>
- Date
- Sep 8, 2016, 08:14 UTC
- Message-ID
- <20160908081446.zlcmz6ci4cw4vc2e@sigill.intra.peff.net>
- In-Reply-To
- <20160908081024.yku2xlb3jj4rplkp@sigill.intra.peff.net>
On Thu, Sep 08, 2016 at 04:10:24AM -0400, Jeff King wrote:
Show 23 quoted lines
> On Thu, Sep 08, 2016 at 09:54:51AM +0200, Johannes Schindelin wrote: > > > > diff.c | 3 ++- > > > diffcore-pickaxe.c | 18 ++++++++---------- > > > xdiff-interface.c | 13 ++++--------- > > > 3 files changed, 14 insertions(+), 20 deletions(-) > > > > I just realized that this should switch the test_expect_failure from 1/3 > > to a test_expect_success. > > Yep. I wonder if we also would want to test that we correctly find > regexes inside binary files. > > E.g., given a mixed binary/text file like: > > printf 'binary\0text' >file && > git add file && > git commit -m file > > then "git log -Stext" will find that file, but "--pickaxe-regex" will > not (using stock git). Ditto for "-Gtext". > > Your patch should fix that.
Of course if I had actually _looked carefully_ at your patch, I would have seen that your test doesn't just check that we don't segfault, but actually confirms that we find the entry.
Sorry for the noise.
-Peff