[PATCH v2 03/14] cli/reply: reuse show_reply_headers() in headers-only format
[notmuch-archives.git] / b1 / 02b4763d7c6493c5da09465468cd539d7c7495
1 Return-Path: <bremner@tesseract.cs.unb.ca>\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 1AFA3431FB6\r
6         for <notmuch@notmuchmail.org>; Tue, 23 Sep 2014 11:45:09 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id xIQ+5Ev2KARu for <notmuch@notmuchmail.org>;\r
16         Tue, 23 Sep 2014 11:45:06 -0700 (PDT)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id EB636431FAF\r
21         for <notmuch@notmuchmail.org>; Tue, 23 Sep 2014 11:45:05 -0700 (PDT)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <bremner@tesseract.cs.unb.ca>)\r
24         id 1XWV5F-0003y0-Iw; Tue, 23 Sep 2014 15:45:05 -0300\r
25 Received: (nullmailer pid 20558 invoked by uid 1000); Tue, 23 Sep 2014\r
26         18:44:59 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [PATCH] potential fix for nmbug merge problems\r
30 Date: Tue, 23 Sep 2014 20:44:53 +0200\r
31 Message-Id: <1411497893-20407-1-git-send-email-david@tethera.net>\r
32 X-Mailer: git-send-email 2.1.0\r
33 In-Reply-To: <20140915181334.GL22539@odin.tremily.us>\r
34 References: <20140915181334.GL22539@odin.tremily.us>\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Tue, 23 Sep 2014 18:45:09 -0000\r
48 \r
49 ---\r
50  scripts/nmbug | 5 ++++-\r
51  1 file changed, 4 insertions(+), 1 deletion(-)\r
52 \r
53 This seems to fix the problems with merges failing on dirty indexes.\r
54 I didn't have time to trace through all of the ramifications, but it\r
55 seems to me by doing a merge with the default index, we are getting\r
56 some kind of random state (or maybe the state of the last merge).\r
57 \r
58 I'll have to road test this a bit more to be sure it's a fix, but maybe you can think about whether it's the righ thing (TM) to do in any case.\r
59 \r
60 diff --git a/scripts/nmbug b/scripts/nmbug\r
61 index 77bec64..47e4ee8 100755\r
62 --- a/scripts/nmbug\r
63 +++ b/scripts/nmbug\r
64 @@ -457,10 +457,13 @@ def merge(reference='@{upstream}'):\r
65      The default reference is '@{upstream}'.\r
66      """\r
67      _insist_committed()\r
68 +    path = _os.path.join(NMBGIT, 'nmbug.index')\r
69 +\r
70      with _tempfile.TemporaryDirectory(prefix='nmbug-merge.') as workdir:\r
71          _git(\r
72              args=['merge', reference],\r
73 -            additional_env={'GIT_WORK_TREE': workdir},\r
74 +            additional_env={'GIT_WORK_TREE': workdir,\r
75 +                            'GIT_INDEX_FILE': path},\r
76              wait=True)\r
77      checkout()\r
78  \r
79 -- \r
80 2.1.0\r
81 \r