summaryrefslogtreecommitdiff
path: root/t/t4034/tex/expect
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-02-22 17:44:46 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-22 14:51:09 -0800
commita78c188a32dd2ce02db2b966a70bffec52c98d20 (patch)
tree420a86e890f7d3850693b3859aca3b8133026da3 /t/t4034/tex/expect
parentwrite_untracked_extension: use FLEX_ALLOC helper (diff)
downloadtgif-a78c188a32dd2ce02db2b966a70bffec52c98d20.tar.xz
fast-import: simplify allocation in start_packfile
This function allocate a packed_git flex-array, and adds a mysterious 2 bytes to the length of the pack_name field. One is for the trailing NUL, but the other has no purpose. This is probably cargo-culted from add_packed_git, which gets the ".idx" path and needed to allocate enough space to hold the matching ".pack" (though since 48bcc1c, we calculate the size there differently). This site, however, is using the raw path of a tempfile, and does not need the extra byte. We can just replace the allocation with FLEX_ALLOC_STR, which handles the allocation and the NUL for us. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4034/tex/expect')
0 files changed, 0 insertions, 0 deletions