git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Rafael Aquini <aquini@redhat.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] send-email: restore --in-reply-to superseding behavior
Date: Wed, 24 Jun 2020 14:33:14 -0700	[thread overview]
Message-ID: <xmqqo8p85eud.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200624195520.2062298-1-aquini@redhat.com> (Rafael Aquini's message of "Wed, 24 Jun 2020 15:55:20 -0400")

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.

>  			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?



>  			}
>  			elsif (/^References: (.*)/i) {
> -				$references = $1;
> +				if (!$initial_in_reply_to) {
> +					$references = $1;
> +				}
>  			}
>  			elsif (!/^Date:\s/i && /^[-A-Za-z]+:\s+\S/) {
>  				push @xh, $_;

  reply	other threads:[~2020-06-24 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 19:55 [PATCH] send-email: restore --in-reply-to superseding behavior Rafael Aquini
2020-06-24 21:33 ` Junio C Hamano [this message]
2020-06-24 23:45   ` Rafael Aquini
2020-06-25 18:47     ` Rafael Aquini
2020-06-26  1:08       ` Carlo Arenas
2020-06-26 13:39         ` Rafael Aquini
2020-06-29 14:11   ` [PATCH v2] " Rafael Aquini
2020-07-01 22:10     ` Carlo Marcelo Arenas Belón

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo8p85eud.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=aquini@redhat.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).