Subject: Re: [PATCH 06/26] mailinfo: always pass "line" as an argument

From: Junio C Hamano <[email-masked]>
Date: Wed, 14 Oct 2015 13:27:22 -0700

Stefan Beller <[email-masked]> writes:

>> @@ -1019,10 +1019,10 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
>>         ungetc(peek, in);
>>
>>         /* process the email header */
>> -       while (read_one_header_line(&line, fin))
>> -               check_header(&line, p_hdr_data, 1);
>> +       while (read_one_header_line(&line_global, fin))
>> +               check_header(&line_global, p_hdr_data, 1);
>
> This is the only function to use line_global if I see correctly.
> The function is called only once, so no need to preserve state
> outside the function. Would it make sense to remove line_global
> completely and have a local variable in this function instead?

That is exactly the step that comes after it does, but if you squash
06 and 07 into one patch (i.e. take diff between the state after 05
and after 07), that realization will not easily come (well, at least
it didn't come to me and I wasn't convinced that the conversion is
correct myself until I split 06 and 07 into two separate steps).