--- /dev/null
+Return-Path: <wking@tremily.us>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 85B43431FC4\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Mar 2015 15:51:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.338\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.338 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_NONE=-0.0001]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id F6JAVr9Bvbcy for <notmuch@notmuchmail.org>;\r
+ Sun, 22 Mar 2015 15:51:49 -0700 (PDT)\r
+Received: from resqmta-po-04v.sys.comcast.net (resqmta-po-04v.sys.comcast.net\r
+ [96.114.154.163])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 4053E431FBF\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Mar 2015 15:51:49 -0700 (PDT)\r
+Received: from resomta-po-04v.sys.comcast.net ([96.114.154.228])\r
+ by resqmta-po-04v.sys.comcast.net with comcast\r
+ id 6mrX1q0024vw8ds01mroCG; Sun, 22 Mar 2015 22:51:48 +0000\r
+Received: from odin.tremily.us ([67.168.81.176])\r
+ by resomta-po-04v.sys.comcast.net with comcast\r
+ id 6mrm1q00N3oF5yT01mrm4y; Sun, 22 Mar 2015 22:51:48 +0000\r
+Received: by odin.tremily.us (Postfix, from userid 1000)\r
+ id C36E316DE2B7; Sun, 22 Mar 2015 15:51:45 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+ t=1427064705; bh=9AXyGYUCwg9cInTygObei5wz79J9BhhmTI994Ow84fk=;\r
+ h=From:To:Cc:Subject:Date;\r
+ b=Qx9htPQkvXf8NIZpAHDDI2cUUa2z4AhA7CIkx/GflfrFP0ZqWUl7DO1nn9STCOWLj\r
+ PesTYSO8oEzQP+OHzP+XSyvL1hG//+W1Fdu3tLVeSRb0yD5dxKW1APagJNnyih5CiD\r
+ x5JnZN+H4r+G91mIAfpj2ShO6S8Zc2n1GiXd7ZhU=\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4] nmbug-status: Use 'show-ref --heads' for loading configs\r
+Date: Sun, 22 Mar 2015 15:51:41 -0700\r
+Message-Id:\r
+ <27b065bda7a31387f8f08069f30a2c2103ffc4e2.1427064160.git.wking@tremily.us>\r
+X-Mailer: git-send-email 2.0.5\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+ s=q20140121; t=1427064708;\r
+ bh=XlQLfk4tBvzkL+u9Cmu97EMOMrS52rLkr44DxJ3fV6c=;\r
+ h=Received:Received:Received:From:To:Subject:Date:Message-Id;\r
+ b=dA7Cu4zv78pSz6117rl2AELbwpyqGUpd1ecPspX0wF97EpOCZO+p2NkYg7FO9SzNN\r
+ k9OofNtTRYLY0EDEnomLT/kjFNMNrOQKpkKc07Boq0Tf1qrh2AfMPK9KT4N22TBS6n\r
+ kgx2sKmJYboo7YTnLTqKpG8R0xYi1BexxSj+1tp3rOBXVsHSnYucnHSdSqwk+ouvJB\r
+ 17DGhmb9/JyU3GLEriYVhN2nk0oNyVQJpFhU6E1ZyCe6ynM0XOa3t/pwo59c45SNlc\r
+ ikTRPnHacVjTDqE5Llae1LAMb9gX0vmIEnShkDa/Uzl/bBt5OT9PZpNMTfsLRM4LWx\r
+ bmLjKlU1UoTEA==\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 22 Mar 2015 22:51:52 -0000\r
+\r
+When loading configs from Git, the bare branch name (without a\r
+refs/heads/ prefix or similar) matches all branches of that name\r
+(including remote-tracking branches):\r
+\r
+ .nmbug $ git show-ref config\r
+ 48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/heads/config\r
+ 48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/remotes/origin/config\r
+ 4b6dbd9ffd152e7476f5101eff26747f34497cee refs/remotes/wking/config\r
+\r
+Instead of relying on the ordering of the matching references, use\r
+--heads to ensure we only match local branches.\r
+---\r
+The only change from v3 [1] is dropping the accidental indentation\r
+hunk that started with '@@ -178,14 +193,14 @@ nmbug-status'. Thanks\r
+to Tomi for pointing this out on IRC.\r
+\r
+[1]: id: e9d25cc269b7bcc058627466adfa2835256b6e76.1427012574.git.wking@tremily.us\r
+ http://thread.gmane.org/gmane.mail.notmuch.general/20356\r
+\r
+ NEWS | 15 +++++++++++++++\r
+ devel/nmbug/nmbug | 1 +\r
+ devel/nmbug/nmbug-status | 2 +-\r
+ 3 files changed, 17 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/NEWS b/NEWS\r
+index 70ad3f3..336a7c3 100644\r
+--- a/NEWS\r
++++ b/NEWS\r
+@@ -23,6 +23,21 @@ Contrib\r
+ previously provided by `notmuch-deliver` should now be provided by\r
+ `notmuch insert`, provided by the main notmuch binary.\r
+ \r
++nmbug-status\r
++------------\r
++\r
++`nmbug-status` now only matches local branches when reading\r
++`status-config.json` from the `config` branch of the `NMBGIT`\r
++repository. To help new users running `nmbug-status`, `nmbug clone`\r
++now creates a local `config` branch tracking `origin/config`. Folks\r
++who use `nmbug-status` with an in-Git config (i.e. you don't use the\r
++`--config` option) who already have `NMBGIT` set up are encouraged to\r
++run:\r
++\r
++ git checkout config origin/config\r
++\r
++in their `NMBGIT` repository (usually `~/.nmbug`).\r
++\r
+ Notmuch 0.19 (2014-11-14)\r
+ =========================\r
+ \r
+diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug\r
+index 932ec12..81f582c 100755\r
+--- a/devel/nmbug/nmbug\r
++++ b/devel/nmbug/nmbug\r
+@@ -308,6 +308,7 @@ def clone(repository):\r
+ wait=True)\r
+ _git(args=['config', '--unset', 'core.worktree'], wait=True)\r
+ _git(args=['config', 'core.bare', 'true'], wait=True)\r
++ _git(args=['branch', 'config', 'origin/config'], wait=True)\r
+ \r
+ \r
+ def _is_committed(status):\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index 19dc48a..e845c2a 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -92,7 +92,7 @@ def read_config(path=None, encoding=None):\r
+ \r
+ # read only the first line from the pipe\r
+ sha1_bytes = subprocess.Popen(\r
+- ['git', '--git-dir', nmbhome, 'show-ref', '-s', branch],\r
++ ['git', '--git-dir', nmbhome, 'show-ref', '-s', '--heads', branch],\r
+ stdout=subprocess.PIPE).stdout.readline()\r
+ sha1 = sha1_bytes.decode(encoding).rstrip()\r
+ if not sha1:\r
+-- \r
+2.1.0.60.g85f0837\r
+\r