summaryrefslogtreecommitdiff
path: root/t/t7408-submodule-reference.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2017-03-28 15:46:47 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-30 14:59:50 -0700
commit446d5d911214fd3d61921478c98d4a88f84e410c (patch)
treeaba115ccfcf2e205ffbd5420abb02dbdf8c971e6 /t/t7408-submodule-reference.sh
parentname-rev: replace static buffer with strbuf (diff)
downloadtgif-446d5d911214fd3d61921478c98d4a88f84e410c.tar.xz
receive-pack: print --pack-header directly into argv array
After receive-pack reads the pack header from the client, it feeds the already-read part to index-pack and unpack-objects via their --pack-header command-line options. To do so, we format it into a fixed buffer, then duplicate it into the child's argv_array. Our buffer is long enough to handle any possible input, so this isn't wrong. But it's more complicated than it needs to be; we can just argv_array_pushf() the final value and avoid the intermediate copy. This drops the magic number and is more efficient, too. Note that we need to push to the argv_array in order, which means we can't do the push until we are in the "unpack-objects versus index-pack" conditional. Rather than duplicate the slightly complicated format specifier, I pushed it into a helper function. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 't/t7408-submodule-reference.sh')
0 files changed, 0 insertions, 0 deletions