summaryrefslogtreecommitdiff
path: root/t/t9823-git-p4-mock-lfs.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2021-09-20 23:48:44 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-22 11:59:50 -0700
commitf84e79ff4bffbcd9de85adc270f5164a6b024d34 (patch)
treee397f31ee0e963c6d653af58689664de99ff1abc /t/t9823-git-p4-mock-lfs.sh
parentgrep: stop modifying buffer in show_line() (diff)
downloadtgif-f84e79ff4bffbcd9de85adc270f5164a6b024d34.tar.xz
grep: stop modifying buffer in grep_source_1()
We find the end of each matching line of a buffer, and then temporarily write a NUL to turn it into a regular C string. But we don't need to do so, because the only thing we do in the interim is pass the line and its length (via an "eol" pointer) to match_line(). And that function should only look at the bytes we passed it, whether it has a terminating NUL or not. We can drop this temporary write in order to simplify the code and make it easier to use const buffers in more of grep.c. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9823-git-p4-mock-lfs.sh')
0 files changed, 0 insertions, 0 deletions