git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-send-email.perl: fix In-Reply-To for second and subsequent patches
@ 2010-10-14  9:38 Antonio Ospite
  2010-10-14 18:22 ` Jonathan Nieder
  0 siblings, 1 reply; 19+ messages in thread
From: Antonio Ospite @ 2010-10-14  9:38 UTC (permalink / raw)
  To: git; +Cc: Antonio Ospite

Make second and subsequent patches appear as replies to the first patch,
even when an initial In-Reply-To is supplied; this is the typical
behaviour we want when we send a series with cover letter in reply to
some discussion, and this is also what the man page says about
--in-reply-to.

In order to achieve the old behaviour of a flat structure in reply to
something the user can always use "--no-thread --in-reply-to <...>".

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>

---

Hi,

Right now _all_ the patches appear as reply to the message indicated as
initial In-Reply-To, and I think this is not right, the behaviour this
patch introduces can be debatable of course, but there are quite some
arguments supporting it:

  - When $initial_reply_to is asked to the user, it is asked as the
    "Message-ID to be used as In-Reply-To for the _first_ email", this
    makes me think that the second and subsequent patches are not using
    it and will be considered as reply to the first message or chained
    according to the --[no-]chain-reply-to setting.

  - git-format-patch states that clearly in the man page, and I think
    git-send-email should behave the same way, and this is explained
    also in the git-send-email man page, look at
    --in-reply-to=<identifier> explanation.

Please keep CCing me on this as I am not subscribed to git@vger.kernel.org.

Thanks,
   Antonio Ospite
   http://ao2.it


 git-send-email.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 8cc4161..615a40d 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1313,7 +1313,7 @@ foreach my $t (@files) {
 
 	# set up for the next message
 	if ($thread && $message_was_sent &&
-		(chain_reply_to() || !defined $reply_to || length($reply_to) == 0)) {
+		($message_num == 1 || chain_reply_to() || !defined $reply_to || length($reply_to) == 0)) {
 		$reply_to = $message_id;
 		if (length $references > 0) {
 			$references .= "\n $message_id";
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-11-12 22:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14  9:38 [PATCH] git-send-email.perl: fix In-Reply-To for second and subsequent patches Antonio Ospite
2010-10-14 18:22 ` Jonathan Nieder
2010-10-15  7:56   ` Antonio Ospite
2010-10-19  9:52     ` [PATCH v2] " Antonio Ospite
2010-10-19 18:26       ` Junio C Hamano
2010-10-19 18:45         ` Junio C Hamano
2010-10-19 22:45         ` Antonio Ospite
2010-10-26 13:50           ` Antonio Ospite
2010-11-05 20:59           ` [PATCH v3] git-send-email.perl: make initial In-Reply-To apply only to first email Antonio Ospite
2010-11-05 22:36             ` Matthieu Moy
2010-11-09 21:23               ` Junio C Hamano
2010-11-10 11:45                 ` Antonio Ospite
2010-11-10 19:48                   ` Junio C Hamano
2010-11-12 14:55                     ` [PATCHi v4] " Antonio Ospite
2010-11-12 20:53                       ` Junio C Hamano
2010-11-12 21:44                       ` Junio C Hamano
2010-11-12 22:51                         ` Antonio Ospite
2010-11-05 21:41           ` [PATCH v2] git-send-email.perl: fix In-Reply-To for second and subsequent patches Jonathan Nieder
2010-11-08 11:03             ` Antonio Ospite

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 NNTP newsgroup(s).