summaryrefslogtreecommitdiff
path: root/t/t4011-diff-symlink.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2017-04-26 23:27:17 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-04-27 14:38:55 +0900
commit2e2bbb9624e10537560c3ac45ff6820ff773b3d6 (patch)
tree71bd4bdda3292666974f4c7d456003e3e7b5e735 /t/t4011-diff-symlink.sh
parentam: fix commit buffer leak in get_commit_info() (diff)
downloadtgif-2e2bbb9624e10537560c3ac45ff6820ff773b3d6.tar.xz
am: simplify allocations in get_commit_info()
After we call split_ident_line(), we have several begin/end pairs for various parts of the ident. We then copy each into a strbuf to create a single string, and then detach that string. We can instead skip the strbuf entirely and just duplicate the strings directly. This is shorter, and it makes it more obvious that we are not leaking the strbuf (we were not before, because every code path either died or hit a strbuf_detach). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4011-diff-symlink.sh')
0 files changed, 0 insertions, 0 deletions