diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2012-11-25 12:08:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-12-02 01:21:58 -0800 |
commit | 118a68f9ddbca6ffd87ab6e32b60771143d9d014 (patch) | |
tree | d6d612ae7eb8bd438f6a7a40cd109dc826984e7c /perl/.gitignore | |
parent | wrap_in_html(): use strbuf_addstr_xml_quoted() (diff) | |
download | tgif-118a68f9ddbca6ffd87ab6e32b60771143d9d014.tar.xz |
wrap_in_html(): process message in bulk rather than line-by-line
Now that we can xml-quote an arbitrary string in O(N), there is no
reason to process the message line by line. This change saves lots of
memory allocations and copying.
The old code would have created invalid output when there was no
body, emitting a closing </pre> without a blank line nor an opening
<pre> after the header. The new code simply returns in this
situation without doing harm (even though either would not make much
sense in the context of imap-send that is meant to send out patches).
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl/.gitignore')
0 files changed, 0 insertions, 0 deletions