summaryrefslogtreecommitdiff
path: root/gitk-git
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2020-03-27 04:03:00 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-27 11:50:54 -0700
commit88124ab263670b4252be7c13d03754a127cee90e (patch)
tree3be57835c5a2d73dab7daa436aebd16fcf009042 /gitk-git
parentGit 2.26 (diff)
downloadtgif-88124ab263670b4252be7c13d03754a127cee90e.tar.xz
test-lib-functions: make packetize() more efficient
The packetize() function takes its input on stdin, and requires 4 separate sub-processes to format a simple string. We can do much better by getting the length via the shell's "${#packet}" construct. The one caveat is that the shell can't put a NUL into a variable, so we'll have to continue to provide the stdin form for a few calls. There are a few other cleanups here in the touched code: - the stdin form of packetize() had an extra stray "%s" when printing the packet - the converted calls in t5562 can be made simpler by redirecting output as a block, rather than repeated appending Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitk-git')
0 files changed, 0 insertions, 0 deletions