From: Jeff King Date: Fri, 09 Sep 2016 09:57:35 GMT Subject: Re: [PATCH v3 3/3] Use the newly-introduced regexec_buf() function Message-ID: <20160909095735.zen2ynpsn7azqfss@sigill.intra.peff.net> In-Reply-To: On Fri, Sep 09, 2016 at 11:52:50AM +0200, Johannes Schindelin wrote: > > Also I agree with Peff that a test with an embedded NUL would be a > > good thing. > > This is something I will leave to somebody else, as it was not my > intention to fix this and I *really* have more pressing things to do right > now... Sorry! I think it is literally just squashing this into your final patch: diff --git a/t/t4061-diff-pickaxe.sh b/t/t4061-diff-pickaxe.sh index f0bf50b..37b8dde 100755 --- a/t/t4061-diff-pickaxe.sh +++ b/t/t4061-diff-pickaxe.sh @@ -19,4 +19,13 @@ test_expect_success '-G matches' ' test 4096-zeroes.txt = "$(cat out)" ' +test_expect_success '-G matches after embedded NUL' ' + printf "one\0two" >file && + git add file && + git commit -m embedded && + echo embedded >expect && + git log -Gtwo --format=%s >actual && + test_cmp expect actual +' + test_done -Peff