diff options
author | Jeff King <peff@peff.net> | 2024-03-20 01:35:57 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-20 01:54:16 +0100 |
commit | 838ba014ce8226e0fb6c87b1b1c587fc61582323 (patch) | |
tree | eb43870c23c17b55cff40e1f6e808dd242b465a5 /refs | |
parent | format-patch: return an allocated string from log_write_email_headers() (diff) | |
download | git-838ba014ce8226e0fb6c87b1b1c587fc61582323.tar.xz git-838ba014ce8226e0fb6c87b1b1c587fc61582323.zip |
format-patch: simplify after-subject MIME header handling
In log_write_email_headers(), we append our MIME headers to the set of
extra headers by creating a new strbuf, adding the existing headers, and
then adding our new ones. We had to do it this way when our output
buffer might point to the constant opt->extra_headers variable.
But since the previous commit, we always make a local copy of that
variable. Let's turn that into a strbuf, which lets the MIME code simply
append to it. That simplifies the function and avoids a pointless extra
copy of the headers.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
0 files changed, 0 insertions, 0 deletions