summaryrefslogtreecommitdiff
path: root/contrib/svn-fe/.gitignore
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-02-22 17:44:57 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-22 14:51:09 -0800
commit7b35eaf8c50609ae4899dcde7fcaa1be0df657df (patch)
treec1d4be07465d212a6b14faf4d144bc9ce41c24cb /contrib/svn-fe/.gitignore
parenttest-path-utils: fix normalize_path_copy output buffer size (diff)
downloadtgif-7b35eaf8c50609ae4899dcde7fcaa1be0df657df.tar.xz
sequencer: simplify memory allocation of get_message
For a commit with sha1 "1234abcd" and subject "foo", this function produces a struct with three strings: 1. "foo" 2. "1234abcd... foo" 3. "parent of 1234abcd... foo" It takes advantage of the fact that these strings are subsets of each other, and allocates only _one_ string, with pointers into the various parts. Unfortunately, this makes the string allocation complicated and hard to follow. Since we keep only one of these in memory at a time, we can afford to simply allocate three strings. This lets us build on tools like xstrfmt and avoid manual computation. While we're here, we can also drop the ad-hoc reimplementation of get_git_commit_encoding(), and simply call that function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/svn-fe/.gitignore')
0 files changed, 0 insertions, 0 deletions