Imported Upstream version 2.28.0
[platform/upstream/git.git] / git-send-email.perl
index dc95656..36c47ba 100755 (executable)
@@ -1699,10 +1699,14 @@ sub process_file {
                                $xfer_encoding = $1 if not defined $xfer_encoding;
                        }
                        elsif (/^In-Reply-To: (.*)/i) {
-                               $in_reply_to = $1;
+                               if (!$initial_in_reply_to || $thread) {
+                                       $in_reply_to = $1;
+                               }
                        }
                        elsif (/^References: (.*)/i) {
-                               $references = $1;
+                               if (!$initial_in_reply_to || $thread) {
+                                       $references = $1;
+                               }
                        }
                        elsif (!/^Date:\s/i && /^[-A-Za-z]+:\s+\S/) {
                                push @xh, $_;