mailinfo: do not let handle_boundary() touch global "line" directly
commit69e24defd629eb6641e653b73459f57ab750c58b
authorJunio C Hamano <gitster@pobox.com>
Sun, 18 Oct 2015 22:40:06 +0000 (18 15:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Oct 2015 22:36:37 +0000 (21 15:36 -0700)
tree34bce811a893024015da7e414aa8e01fadd4068c
parentfde00d50f6b084680085b9924b198e7f3138fc9e
mailinfo: do not let handle_boundary() touch global "line" directly

This function has a single caller, and called with the global "line"
holding the multi-part boundary line the caller saw while processing
the e-mail body.  The function then goes into a loop to process each
line of the input, and fills the same global "line" variable from
the input as it needs to read more lines to process the multi-part
headers.

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 still is a helper function that this function calls that still
touches the global directly; it will be updated as the series progresses.

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