All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] send-email propagates "In-Reply-To"
@ 2021-08-22  9:24 Marvin Häuser
  2021-08-22 12:11 ` Bagas Sanjaya
  2021-08-23 16:35 ` Jeff King
  0 siblings, 2 replies; 8+ messages in thread
From: Marvin Häuser @ 2021-08-22  9:24 UTC (permalink / raw)
  To: git

Good day everyone,

"git send-email" propagates the "In-Reply-To" header of the last prior 
patch with such defined to subsequent patches which do not define such 
explicitly. I suspect this behaviour is incorrect as I could not find 
any documentation on this. I'm sorry if this behaviour is actually 
expected, and would be happy if someone could point me to the 
appropriate documentation. This was reproduced on Fedora 34 with git 
2.33.0 and "--no-thread".

Steps to reproduce:
1. Create two patches, one of which has an "In-Reply-To" field 
("patch-in-reply.patch") and one of which does not 
("patch-no-in-reply.patch").
2. Run "git send-email --dry-run --no-thread patch-in-reply.patch 
patch-no-in-reply.patch"
2.1. Observe the emission of an "In-Reply-To" header for 
"patch-no-in-reply.patch" with no such header.
3. Run "git send-email --dry-run --no-thread patch-no-in-reply.patch 
patch-in-reply.patch"
3.1. Observe the omission of an "In-Reply-To" header for 
"patch-no-in-reply.patch" with no such header.

Expected behaviour:
With no threading and no other sorts of explicitly defining the 
"In-Reply-To" header, I expect to always observe the behaviour of 3.1., 
and to not observe the behaviour of 2.1.

The "issue" is "in_reply_to" is overwritten here [1], which is the main 
loop worker to process all files passed to send-email [2], but it is not 
restored for subsequent patches. Unless required otherwise (e.g. 
send-email threading), it should be restored to its default value for 
each patch I believe.

I wrote a quick patch to adjust 2.1. to 3.1. [3]. I have no time right 
now to review the submission guidelines (and thus did not submit the 
patch "properly" yet), but I will try to get to that tonight or some 
time next week. If in the mean time you could provide any feedback on 
the behaviour or the patch, so that I can get things right the first 
time, that would be great!

Thank you for your time, I am looking forward to your feedback.

Best regards,
Marvin


[1] 
https://github.com/git/git/blob/225bc32a989d7a22fa6addafd4ce7dcd04675dbf/git-send-email.perl#L1800

[2] 
https://github.com/git/git/blob/225bc32a989d7a22fa6addafd4ce7dcd04675dbf/git-send-email.perl#L1952-L1956

[3] 
https://github.com/mhaeuser/git/commit/d87f49a02c0efa3084ae6c70bbf583b865744e43

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

end of thread, other threads:[~2021-08-25  0:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-22  9:24 [BUG] send-email propagates "In-Reply-To" Marvin Häuser
2021-08-22 12:11 ` Bagas Sanjaya
2021-08-23 16:35 ` Jeff King
2021-08-23 17:44   ` Marvin Häuser
2021-08-23 18:27     ` Jeff King
2021-08-23 21:47       ` Marvin Häuser
2021-08-24  7:48         ` Carlo Marcelo Arenas Belón
2021-08-25  0:15         ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.