mailinfo: do not let handle_body() touch global "line" directly
commitfde00d50f6b084680085b9924b198e7f3138fc9e
authorJunio C Hamano <gitster@pobox.com>
Sun, 18 Oct 2015 22:36:16 +0000 (18 15:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Oct 2015 22:36:37 +0000 (21 15:36 -0700)
tree9cfea023b34dec79ddbadbf1ae16b192f1de058c
parent269e239c48ac8f70248beb4539535af0ed930682
mailinfo: do not let handle_body() touch global "line" directly

This function has a single caller, and called with the global "line"
holding the first line of the e-mail body after the caller finished
processing the e-mail headers.  The function then goes into a loop
to process each line of the input, starting from what was given by
its caller, and fills the same global "line" variable from the input
as it needs to process more lines.

Let the caller explicitly pass a pointer to this global "line"
variable as an argument, and have the function itself use that
strbuf throughout, instead of referring to the global "line" itself.

There are helper functions that this function calls that still touch
the global directly; they will be updated as the series progresses.

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