Automatic suppression of non-duplicate messages
[notmuch-archives.git] / ca / a9c2bb14b0ce8b4ac72f24609b8c05e90005cc
1 Return-Path: <five9a2@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id A11CA431FBC\r
6         for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 10:01:55 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id cGvr5Nbzu79S for <notmuch@notmuchmail.org>;\r
11         Wed, 25 Nov 2009 10:01:55 -0800 (PST)\r
12 Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com\r
13         [209.85.218.224])\r
14         by olra.theworths.org (Postfix) with ESMTP id DAF57431FAE\r
15         for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 10:01:54 -0800 (PST)\r
16 Received: by bwz24 with SMTP id 24so6126486bwz.30\r
17         for <notmuch@notmuchmail.org>; Wed, 25 Nov 2009 10:01:54 -0800 (PST)\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
19         h=domainkey-signature:received:received:sender:from:to:cc:subject\r
20         :date:message-id:x-mailer:in-reply-to:references;\r
21         bh=nZ/y5xIvWj1QLyDMBDEisCWt3qSjS63dr+EcLt0j5nI=;\r
22         b=XDWFqmvEEG25kcmlV2z3Sfi/9EFkUHc6nB4Q12OwNficvBTOh0Cc82dsgZmkNs0A+z\r
23         o3Qp4MuYZLhNqh1zSqKrtVZ8ICUSO0DjbSoWjt68teODUt97SS+GI2rN7Ku//gMHw5og\r
24         0ZxnVk8LJlQAW38XK1MeDSYy1hgTV+D9Ayyxs=\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
26         h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
27         :references;\r
28         b=H3gq0vL0+464pGY4myZrncBZD2yB028yQi9abKKSOB+BXekGBzGnUIJ2f2tihGVow2\r
29         cuvTnC6kYw5fVYFaMzIFDBfX7CbMSAoME/YxRzK67usrumvjJDKtjC/ugFQ5dSLbOiSc\r
30         9FBFHP8yUbWC8KYXGf8Z4wewpSOSI5hrAvnIs=\r
31 Received: by 10.204.7.87 with SMTP id c23mr7792334bkc.97.1259172113731;\r
32         Wed, 25 Nov 2009 10:01:53 -0800 (PST)\r
33 Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11])\r
34         by mx.google.com with ESMTPS id k29sm8997651fkk.51.2009.11.25.10.01.52\r
35         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
36         Wed, 25 Nov 2009 10:01:52 -0800 (PST)\r
37 Sender: Jed Brown <five9a2@gmail.com>\r
38 From: Jed Brown <jed@59A2.org>\r
39 To: notmuch@notmuchmail.org\r
40 Date: Wed, 25 Nov 2009 19:02:18 +0100\r
41 Message-Id: <1259172139-3274-1-git-send-email-jed@59A2.org>\r
42 X-Mailer: git-send-email 1.6.5.3\r
43 In-Reply-To: <1259112914-19806-2-git-send-email-jed@59A2.org>\r
44 References: <1259112914-19806-2-git-send-email-jed@59A2.org>\r
45 Subject: [notmuch] [PATCH 1/2] reply --format=headers-only: set In-Reply-To\r
46         header, with ID *last* in References\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.12\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Wed, 25 Nov 2009 18:01:55 -0000\r
60 \r
61 Apparently this is actually the correct way to do it, it's silly to do\r
62 it wrong just to conform to one of git's internal data structures.\r
63 ---\r
64  notmuch-reply.c |   12 ++++++++----\r
65  1 files changed, 8 insertions(+), 4 deletions(-)\r
66 \r
67 diff --git a/notmuch-reply.c b/notmuch-reply.c\r
68 index e85568c..9ca1236 100644\r
69 --- a/notmuch-reply.c\r
70 +++ b/notmuch-reply.c\r
71 @@ -310,15 +310,19 @@ notmuch_reply_format_headers_only(void *ctx, notmuch_config_t *config, notmuch_q\r
72         in_reply_to = talloc_asprintf (ctx, "<%s>",\r
73                              notmuch_message_get_message_id (message));\r
74  \r
75 +        g_mime_object_set_header (GMIME_OBJECT (reply),\r
76 +                                 "In-Reply-To", in_reply_to);\r
77 +\r
78 +\r
79         orig_references = notmuch_message_get_header (message, "references");\r
80  \r
81 -       /* We print References first because git format-patch treats it specially.\r
82 -        * Git uses the first entry of References to create In-Reply-To.\r
83 +       /* We print In-Reply-To followed by References because git format-patch treats them\r
84 +         * specially.  Git does not interpret the other headers specially\r
85          */\r
86         references = talloc_asprintf (ctx, "%s%s%s",\r
87 -                                     in_reply_to,\r
88                                       orig_references ? orig_references : "",\r
89 -                                     orig_references ? " " : "");\r
90 +                                     orig_references ? " " : "",\r
91 +                                     in_reply_to);\r
92         g_mime_object_set_header (GMIME_OBJECT (reply),\r
93                                   "References", references);\r
94  \r
95 -- \r
96 1.6.5.3\r
97 \r