Subject: Re: [PATCH resend] git-send-email: Use sanitized address when reading mbox body

From: Junio C Hamano <[email-masked]>
Date: Wed, 26 Jun 2024 06:33:24 -0700

Csókás Bence <[email-masked]> writes:

>> In any case, if we were to move forward with this topic (whether
>> "send to corrected $sc instead" or "$c is suspicious, do not add it
>> to $cc" is picked as the direction), the motivation behind the
>> design decision to treat the address taken from a trailer line
>> differently needs to be explained better, I think. [...]
>> Your proposed commit log message is the place to help them.
>
> Okay. So in short, I should add justification for trusting mbox
> headers and not the message body, correct?

We want these to be explained for future readers:

 (1) we stuff the sanitized address to @cc in this particular place,
     but we still let all other places copy the original taken from
     the message to @to or @cc (as in the original code).

 (2) the reason behind the above difference is because we trust less
     about the "address looking" strings that appear on the trailer
     lines.

So, not just (2), but in order for the readers to understand why
they should care about (2), they need to be told (1) as well.

Thanks.