Re: [PATCH] send-email: restore --in-reply-to superseding behavior
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 24, 2020, 21:33 UTC
- Message-ID
- <xmqqo8p85eud.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200624195520.2062298-1-aquini@redhat.com>
Rafael Aquini <aquini@redhat.com> writes:
> git send-email --in-reply-to= fails to override the email headers, > if they're present in the output of format-patch, which breakes the
Will do s/breakes/breaks/ while applying.
It makes me wonder, however, why it is a good idea to have the I-R-T in the format patch output in the first place.
Show 5 quoted lines
> elsif (/^In-Reply-To: (.*)/i) {
> - $in_reply_to = $1;
> + if (!$initial_in_reply_to) {
> + $in_reply_to = $1;
> + }I can see how this would work the way it should for the first message we send out, so it would work well for a single patch.
But what does this change do to the chaining (either making [PATCH 1/N] thru [PATCH N/N] as responses to the cover letter [PATCH 0/N], or making [PATCH n+1/N] as response to [PATCH n/N] for 1 <= n < N) of multiple messages?
When you prepare a series whose 1..N/N are all pointing at 0/N with the already prepared In-Reply-To (so you have N+1 files to send out), wouldn't you want to make 0/N a reply to a particular message you specify on the command line, while keeping the relationship among your messages intact? Doesn't having $initial_in_reply_to (i.e. command line override) help above code break the chaning?
Show 9 quoted lines
> }
> elsif (/^References: (.*)/i) {
> - $references = $1;
> + if (!$initial_in_reply_to) {
> + $references = $1;
> + }
> }
> elsif (!/^Date:\s/i && /^[-A-Za-z]+:\s+\S/) {
> push @xh, $_;