--- /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 16962431FD6\r
+ for <notmuch@notmuchmail.org>; Sat, 10 May 2014 12:17:33 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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 s1AEZXYEJp+J for <notmuch@notmuchmail.org>;\r
+ Sat, 10 May 2014 12:17:27 -0700 (PDT)\r
+Received: from qmta10.westchester.pa.mail.comcast.net\r
+ (qmta10.westchester.pa.mail.comcast.net [76.96.62.17])\r
+ by olra.theworths.org (Postfix) with ESMTP id 4567F431FC2\r
+ for <notmuch@notmuchmail.org>; Sat, 10 May 2014 12:17:24 -0700 (PDT)\r
+Received: from omta06.westchester.pa.mail.comcast.net ([76.96.62.51])\r
+ by qmta10.westchester.pa.mail.comcast.net with comcast\r
+ id 0K4p1o00116LCl05AKHL3r; Sat, 10 May 2014 19:17:20 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+ by omta06.westchester.pa.mail.comcast.net with comcast\r
+ id 0KHG1o00P152l3L3SKHHd1; Sat, 10 May 2014 19:17:18 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+ by odin.tremily.us (Postfix) with ESMTPS id 58AB4119F4AF;\r
+ Sat, 10 May 2014 12:17:16 -0700 (PDT)\r
+Received: (nullmailer pid 7966 invoked by uid 1000);\r
+ Sat, 10 May 2014 19:16:43 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] nmbug-status: Use 'show-ref --heads' for loading configs\r
+Date: Sat, 10 May 2014 12:16:39 -0700\r
+Message-Id:\r
+ <7ddcf7368895768aa0a2d37dac0d4f96e9666f16.1399749244.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.9.1.353.gc66d89d\r
+In-Reply-To: <cover.1399749244.git.wking@tremily.us>\r
+References: <cover.1399749244.git.wking@tremily.us>\r
+In-Reply-To: <cover.1399749244.git.wking@tremily.us>\r
+References: <cover.1399749244.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+ s=q20140121; t=1399749440;\r
+ bh=iZQIHHMOntfhaLmAKrWxUN0aMVer0CrkzfYK3f5SqM4=;\r
+ h=Received:Received:Received:Received:From:To:Subject:Date:\r
+ Message-Id;\r
+ b=GWfs3fZfhfWTdbBSqjd0cErZsXo4HIW9M3lGwJehe6SWcuMadv3qhcGA//CdPFB0P\r
+ F1DjbpcfIGK9mtwIoD15xOJowFuKlCTfkZT/idoFrLbYJhaj6uv4zhTv8S1sB/WbRC\r
+ YyyTVuE1iDTGg/cCI9AsCvLoSjXPjbJaT4VWSA5YO3G/N19gjg5loVr3Q+AjOTHR+t\r
+ /4k45p9yGI7xg6/oQ+exscg+PAhndfeV2B+Av8URhPE6Ghc3qOHIim53QtLst2QGT9\r
+ Ew09rEojf/S7QCJhB2Oklk07IuJqlYLaeVVu5bmbfIipv+DqHurVLNjEgV20y0ApXt\r
+ bFZ91eIMAyDbA==\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: Sat, 10 May 2014 19:17:33 -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
+ NEWS | 18 ++++++++++++++++++\r
+ devel/nmbug/nmbug | 1 +\r
+ devel/nmbug/nmbug-status | 2 +-\r
+ 3 files changed, 20 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/NEWS b/NEWS\r
+index bcd311d..5f7d30a 100644\r
+--- a/NEWS\r
++++ b/NEWS\r
+@@ -1,3 +1,21 @@\r
++Notmuch 0.19 (UNRELEASED)\r
++=========================\r
++\r
++nmbug\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.18~rc0 (2014-04-22)\r
+ =============================\r
+ \r
+diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug\r
+index b18ded7..c6793a5 100755\r
+--- a/devel/nmbug/nmbug\r
++++ b/devel/nmbug/nmbug\r
+@@ -135,6 +135,7 @@ sub do_clone {\r
+ or die "'git clone' exited with nonzero value\n";\r
+ git ('config', '--unset', 'core.worktree');\r
+ git ('config', 'core.bare', 'true');\r
++ git ('branch', 'config', 'origin/config');\r
+ }\r
+ \r
+ sub is_committed {\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index 75a6e47..610c281 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -72,7 +72,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
+1.9.1.353.gc66d89d\r
+\r