Re: [WIP PATCH] emacs: query: completion for from: in searches
[notmuch-archives.git] / 7a / 18e2accfbd68c4bf7639455487fa00896241cc
1 Return-Path: <wking@tremily.us>\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 01CE8431FC4\r
6         for <notmuch@notmuchmail.org>; Sun, 15 Mar 2015 02:47: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: 2.338\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.338 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_NONE=-0.0001]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id CjJMek3gPs6t for <notmuch@notmuchmail.org>;\r
18         Sun, 15 Mar 2015 02:47:06 -0700 (PDT)\r
19 Received: from resqmta-ch2-01v.sys.comcast.net\r
20         (resqmta-ch2-01v.sys.comcast.net [69.252.207.33])\r
21         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
22         (No client certificate requested)\r
23         by olra.theworths.org (Postfix) with ESMTPS id A30F7431FC2\r
24         for <notmuch@notmuchmail.org>; Sun, 15 Mar 2015 02:47:06 -0700 (PDT)\r
25 Received: from resomta-ch2-11v.sys.comcast.net ([69.252.207.107])\r
26         by resqmta-ch2-01v.sys.comcast.net with comcast\r
27         id 3ln61q0012Ka2Q501ln6e1; Sun, 15 Mar 2015 09:47:06 +0000\r
28 Received: from odin.tremily.us ([67.168.81.176])\r
29         by resomta-ch2-11v.sys.comcast.net with comcast\r
30         id 3ln51q0023oF5yT01ln5Se; Sun, 15 Mar 2015 09:47:06 +0000\r
31 Received: by odin.tremily.us (Postfix, from userid 1000)\r
32         id DEABA16B96F8; Sun, 15 Mar 2015 02:47:04 -0700 (PDT)\r
33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
34         t=1426412824; bh=PVWy/83C9JYKpIA1mRf6WJqZ7ieYLvgX5FMgFEk/qJ0=;\r
35         h=From:To:Cc:Subject:Date;\r
36         b=qCHLbwpqf+CVnUzvGQaSz1VDaeMRVTbW7zDDLQ8S0R5y2605gswi367o0Tl4ui4XR\r
37         RDJ5zm1K1VQVuZ69lB5AUgHlO410zaXIfN9qJOsiyZ3Qe75q4/HCwzY1tIrUQfwA3Y\r
38         9DTRI5EWTvX7viOwoitYlLb5LFQ5BBBOb4ZGDJqU=\r
39 From: "W. Trevor King" <wking@tremily.us>\r
40 To: notmuch@notmuchmail.org\r
41 Subject: [PATCH v2] nmbug-status: Use 'show-ref --heads' for loading configs\r
42 Date: Sun, 15 Mar 2015 02:46:57 -0700\r
43 Message-Id:\r
44  <5e97afaab6c01e980ca6194a1c04aa0310e28ab8.1426412504.git.wking@tremily.us>\r
45 X-Mailer: git-send-email 2.0.5\r
46 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
47         s=q20140121; t=1426412826;\r
48         bh=iAZAwbhekfTKo4GGxkCdtIlQluxJmoX1yxFL1WY5mlo=;\r
49         h=Received:Received:Received:From:To:Subject:Date:Message-Id;\r
50         b=FZ0f9vFws9G/j8RbTrpEHjIxDnMTKk+zucbSmFJNEMIpIKRuIEJ8p/06GMz443cYo\r
51         09CxgnzO9DDtLXo3RbGekJiJrNRyKpeLiG9xYcRmRh8UPtzoJQ9GoE9RYU0nn+sek5\r
52         1aGQ8O8FOzMRp7JxZKs23IdOsKGQvc7SekqePQXJP+HlxX0OAqTQP0wucrQSWG96pb\r
53         CPNz785ribZBZW/tVGhk9G0GWKRz0fJyyDmjIuz+07WT13b0daQOBKAXSUC8l/12TL\r
54         L52JZCDJo8OwnWGneOiC+g/BsiMtzaZZJGb5VK6WbSUZQhWzp35YDtGyUvS11WjrTo\r
55         m3x3FbNmQKPaA==\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Sun, 15 Mar 2015 09:47:10 -0000\r
69 \r
70 When loading configs from Git, the bare branch name (without a\r
71 refs/heads/ prefix or similar) matches all branches of that name\r
72 (including remote-tracking branches):\r
73 \r
74   .nmbug $ git show-ref config\r
75   48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/heads/config\r
76   48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/remotes/origin/config\r
77   4b6dbd9ffd152e7476f5101eff26747f34497cee refs/remotes/wking/config\r
78 \r
79 Instead of relying on the ordering of the matching references, use\r
80 --heads to ensure we only match local branches.\r
81 ---\r
82 This is v2 of [1], with the only changes being:\r
83 \r
84 * Relocate the NEWS blurb to fit into the current pending release\r
85   (0.20).\r
86 * Translate the 'nmbug' patch from Perl to Python.\r
87 \r
88 [1]: id:7ddcf7368895768aa0a2d37dac0d4f96e9666f16.1399749244.git.wking@tremily.us\r
89      http://article.gmane.org/gmane.mail.notmuch.general/18306\r
90 \r
91  NEWS                     | 12 ++++++++++++\r
92  devel/nmbug/nmbug        |  1 +\r
93  devel/nmbug/nmbug-status |  2 +-\r
94  3 files changed, 14 insertions(+), 1 deletion(-)\r
95 \r
96 diff --git a/NEWS b/NEWS\r
97 index 70ad3f3..0441587 100644\r
98 --- a/NEWS\r
99 +++ b/NEWS\r
100 @@ -187,6 +187,18 @@ from the config file.  Use something like:\r
101        ...\r
102      },\r
103  \r
104 +`nmbug-status` now only matches local branches when reading\r
105 +`status-config.json` from the `config` branch of the `NMBGIT`\r
106 +repository.  To help new users running `nmbug-status`, `nmbug clone`\r
107 +now creates a local `config` branch tracking `origin/config`.  Folks\r
108 +who use `nmbug-status` with an in-Git config (i.e. you don't use the\r
109 +`--config` option) who already have `NMBGIT` set up are encouraged to\r
110 +run:\r
111 +\r
112 +    git checkout config origin/config\r
113 +\r
114 +in their `NMBGIT` repository (usually `~/.nmbug`).\r
115 +\r
116  Python Bindings\r
117  ---------------\r
118  \r
119 diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug\r
120 index 932ec12..81f582c 100755\r
121 --- a/devel/nmbug/nmbug\r
122 +++ b/devel/nmbug/nmbug\r
123 @@ -308,6 +308,7 @@ def clone(repository):\r
124              wait=True)\r
125      _git(args=['config', '--unset', 'core.worktree'], wait=True)\r
126      _git(args=['config', 'core.bare', 'true'], wait=True)\r
127 +    _git(args=['branch', 'config', 'origin/config'], wait=True)\r
128  \r
129  \r
130  def _is_committed(status):\r
131 diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
132 index 19dc48a..e845c2a 100755\r
133 --- a/devel/nmbug/nmbug-status\r
134 +++ b/devel/nmbug/nmbug-status\r
135 @@ -92,7 +92,7 @@ def read_config(path=None, encoding=None):\r
136  \r
137          # read only the first line from the pipe\r
138          sha1_bytes = subprocess.Popen(\r
139 -            ['git', '--git-dir', nmbhome, 'show-ref', '-s', branch],\r
140 +            ['git', '--git-dir', nmbhome, 'show-ref', '-s', '--heads', branch],\r
141              stdout=subprocess.PIPE).stdout.readline()\r
142          sha1 = sha1_bytes.decode(encoding).rstrip()\r
143          if not sha1:\r
144 -- \r
145 1.8.4\r
146 \r