summaryrefslogtreecommitdiff
path: root/Documentation/git-merge-tree.txt
diff options
context:
space:
mode:
authorLibravatar Pierre Habouzit <madcoder@debian.org>2007-09-15 23:53:05 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-09-18 03:07:58 -0700
commit68d3025a805097ec148ec6e9b0b54a5db1ef138e (patch)
treef6e8d1a5fdb89dd52a7f90d34bb271a2c4048cc4 /Documentation/git-merge-tree.txt
parentfast-import optimization: (diff)
downloadtgif-68d3025a805097ec148ec6e9b0b54a5db1ef138e.tar.xz
Add xmemdupz() that duplicates a block of memory, and NUL terminates it.
A lot of places in git's code use code like: char *res; len = ... find length of an interesting segment in src ...; res = xmalloc(len + 1); memcpy(res, src, len); res[len] = '\0'; return res; A new function xmemdupz() captures the allocation, copy and NUL termination. Existing xstrndup() is reimplemented in terms of this new function. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-merge-tree.txt')
0 files changed, 0 insertions, 0 deletions