summaryrefslogtreecommitdiffstats
path: root/trailer.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2016-11-02 10:29:18 -0700
committerJunio C Hamano <gitster@pobox.com>2016-11-29 14:22:18 -0800
commit022349c3b091f2aa047f1cd12b5409d564b25324 (patch)
tree8cfbb0786d7ef38795ed0a8360e4dfe3ee7bee9a /trailer.h
parent710714aaa822acbad14f1b7100fa2776d2bc8ce6 (diff)
downloadgit-022349c3b091f2aa047f1cd12b5409d564b25324.tar.gz
git-022349c3b091f2aa047f1cd12b5409d564b25324.tar.xz
trailer: avoid unnecessary splitting on lines
trailer.c currently splits lines while processing a buffer (and also rejoins lines when needing to invoke ignore_non_trailer). Avoid such line splitting, except when generating the strings corresponding to trailers (for ease of use by clients - a subsequent patch will allow other components to obtain the layout of a trailer block in a buffer, including the trailers themselves). The main purpose of this is to make it easy to return pointers into the original buffer (for a subsequent patch), but this also significantly reduces the number of memory allocations required. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trailer.h')
0 files changed, 0 insertions, 0 deletions