aboutsummaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-04-26 23:27:17 -0400
committerJunio C Hamano <gitster@pobox.com>2017-04-27 14:38:55 +0900
commit2e2bbb9624e10537560c3ac45ff6820ff773b3d6 (patch)
tree71bd4bdda3292666974f4c7d456003e3e7b5e735 /shallow.c
parentf131db9e3166c528d3b0352b653eb0d9deca5a65 (diff)
downloadgit-2e2bbb9624e10537560c3ac45ff6820ff773b3d6.tar.gz
git-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 'shallow.c')
0 files changed, 0 insertions, 0 deletions