--- /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 3256D431FB6\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Mar 2015 01:31:20 -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] 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 ysvOG8kDn30r for <notmuch@notmuchmail.org>;\r
+ Sun, 22 Mar 2015 01:31:16 -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 71129431FAE\r
+ for <notmuch@notmuchmail.org>; Sun, 22 Mar 2015 01:31:16 -0700 (PDT)\r
+Received: from resomta-po-03v.sys.comcast.net ([96.114.154.227])\r
+ by resqmta-po-04v.sys.comcast.net with comcast\r
+ id 6YXE1q0024ueUHc01YXEFa; Sun, 22 Mar 2015 08:31:14 +0000\r
+Received: from odin.tremily.us ([67.168.81.176])\r
+ by resomta-po-03v.sys.comcast.net with comcast\r
+ id 6YXB1q0063oF5yT01YXBSW; Sun, 22 Mar 2015 08:31:14 +0000\r
+Received: by odin.tremily.us (Postfix, from userid 1000)\r
+ id 5757D16D6865; Sun, 22 Mar 2015 01:31:11 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+ t=1427013071; bh=tN83NNTXxLXHw2/7mI1rE6sQqRpKYQeynaM7Rmm7NAE=;\r
+ h=From:To:Cc:Subject:Date;\r
+ b=p3dxUBu+d1OjpKSuMqcEXWQTmKYLndUU0p6n8AoFxPZMa1P1cvBMaDr5ake3n4G+L\r
+ jYL2UiFO5oXtmrS4x/iGbDM7OrCpFjrTK4dZJ771773jHZAQ+3+4clyh6Z59vvjydU\r
+ MqauV//9g3mEZ4TUl7qaTlMuthirlur3rIKO95N0=\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3] nmbug-status: Use 'show-ref --heads' for loading configs\r
+Date: Sun, 22 Mar 2015 01:31:09 -0700\r
+Message-Id:\r
+ <e9d25cc269b7bcc058627466adfa2835256b6e76.1427012574.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=1427013074;\r
+ bh=5HQHI2D1woA/MJ8y1NlfwCdxKIQPvLjsash4t7OluZM=;\r
+ h=Received:Received:Received:From:To:Subject:Date:Message-Id;\r
+ b=WVc0wdqq0J3aNM99zz2DSh9olSj35IVAt5zRaUq/n1GaQf1W5DsC2DNyAXUCuoEOi\r
+ sMyeqHWd4hflf/8Vh+Q9jkUxN7gtEiqsdSamhfDGgWuAt0hvQMj0U6xr//5rVyQ68l\r
+ As4hHdc2kI/XgpMhMd2V+cy5lH/ckvtHOSM7ST8yfh/l1ZEvMIsiiiGB3pZ/8QuJgS\r
+ lFQTvQ6+T1bCB53FaPUhdp1LsOiSM8VczVY5WO16L/jCf9vFtpUOecuYRpClYwkvBH\r
+ S5Un5VwltOXM2WwmiKxEkW0PpmEoQx/Xb60D6WqFlUWkYdDsPftQVUMY5P8fQ618Ph\r
+ P5CKBYMVeff6Q==\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 08:31:20 -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 since v2 [1] is shifting the NEWS entry into the\r
+unreleased 0.20 section [2].\r
+\r
+[1]: id:5e97afaab6c01e980ca6194a1c04aa0310e28ab8.1426412504.git.wking@tremily.us\r
+ http://thread.gmane.org/gmane.mail.notmuch.general/20344/\r
+[2]: id:m2bnjm7o16.fsf@guru.guru-group.fi\r
+ http://article.gmane.org/gmane.mail.notmuch.general/20350\r
+\r
+\r
+ NEWS | 31 +++++++++++++++++++++++--------\r
+ devel/nmbug/nmbug | 1 +\r
+ devel/nmbug/nmbug-status | 2 +-\r
+ 3 files changed, 25 insertions(+), 9 deletions(-)\r
+\r
+diff --git a/NEWS b/NEWS\r
+index 70ad3f3..de13bbd 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
+@@ -178,14 +193,14 @@ nmbug-status\r
+ `nmbug-status` can now optionally load header and footer templates\r
+ from the config file. Use something like:\r
+ \r
+- {\r
+- "meta": {\r
+- "header": "<!DOCTYPE html>\n<html lang="en">\n...",\r
+- "footer": "</body></html>",\r
+- ...\r
+- },\r
+- ...\r
+- },\r
++{\r
++"meta": {\r
++"header": "<!DOCTYPE html>\n<html lang="en">\n...",\r
++"footer": "</body></html>",\r
++...\r
++},\r
++...\r
++},\r
+ \r
+ Python Bindings\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