{"thread":{"id":"3360","subject":"[PATCH] Use --refid option even when sending a cover mail","startedAt":"2006-02-17T02:07:27Z","lastAt":"2006-02-17T02:07:27Z","messageCount":1,"participants":["Karl Hasselström"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16294","messageId":"20060217020727.12978.2049.stgit@backpacker.hemma.treskal.com","threadId":"3360","inReplyTo":null,"subject":"[PATCH] Use --refid option even when sending a cover mail","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2006-02-17T02:07:27Z","receivedAt":"2006-02-17T02:07:27Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"StGIT used to just ignore the --refid option when sending a cover\nmail. With this patch, it will send the cover mail as a reply to the\nmail identified by the refid, and the patch emails as replies to the\ncover mail as usual.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n stgit/commands/mail.py |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/stgit/commands/mail.py b/stgit/commands/mail.py\nindex b3b7b49..975f8c9 100644\n--- a/stgit/commands/mail.py\n+++ b/stgit/commands/mail.py\n@@ -199,6 +199,9 @@ def __build_cover(tmpl, total_nr, msg_id\n \n     headers_end = __build_address_headers(options)\n     headers_end += 'Message-Id: %s\\n' % msg_id\n+    if options.refid:\n+        headers_end += \"In-Reply-To: %s\\n\" % options.refid\n+        headers_end += \"References: %s\\n\" % options.refid\n \n     if options.version:\n         version_str = ' %s' % options.version\n"}]}