summaryrefslogtreecommitdiff
path: root/t/t7800-difftool.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2019-02-14 00:51:03 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-02-14 15:26:15 -0800
commit5c326d12524e4395b0ff184123e71738db6c9f65 (patch)
tree48bc43e835498a5d69591b0da04f40b8c7af8841 /t/t7800-difftool.sh
parentref-filter: drop unused "obj" parameters (diff)
downloadtgif-5c326d12524e4395b0ff184123e71738db6c9f65.tar.xz
ref-filter: drop unused "sz" parameters
Many of our grab_* functions, which parse the object content, take a buf/sz pair of the object bytes. However, the functions which actually parse the buffers (like find_wholine() and find_subpos()) never look at "sz", and instead use functions like strchr() and strchrnul() that assume the result is NUL-terminated. This is OK in practice (and common for Git's parsing code), since we always allocate an extra NUL when loading an object into memory (and likewise, we are OK with stopping parsing if a commit or tag contains an embedded NUL). Let's drop these extra "sz" parameters, as they are misleading about how the functions intend to access the buffer. We can drop from both the functions mentioned above, which in turn lets us drop from their callers, cascading all the way up to the top-level grab_values(). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7800-difftool.sh')
0 files changed, 0 insertions, 0 deletions