mailinfo: keep the parsed log message in a strbuf
commit05e625e5bf5231af984f17b82be9c48063b37242
authorJunio C Hamano <gitster@pobox.com>
Thu, 15 Oct 2015 00:43:27 +0000 (14 17:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Oct 2015 22:57:17 +0000 (21 15:57 -0700)
tree8bffc18f516eee935512382ed929ebeda4456280
parent4933910ab7a74ebcf13342726d7f055ee35a8f7c
mailinfo: keep the parsed log message in a strbuf

When mailinfo() is eventually libified, the calling "git am" still
will have to write out the log message in the "msg" file for hooks
and other users of the information, but it does not have to reopen
and reread what it wrote earlier if the function kept it in a strbuf.

This also removes the need for seeking and truncating the output
file when we see a scissors mark in the input, which in turn allows
us to lose two callsites of die_errno().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mailinfo.c