Re: [PATCH 3/4] nmbug: Catch stderr in is_unmerged
authorW. Trevor King <wking@tremily.us>
Wed, 16 Jul 2014 00:17:30 +0000 (17:17 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:41 +0000 (10:03 -0800)
63/80916a1a4f9d8da6e542dd10be92f2ba31292e [new file with mode: 0644]

diff --git a/63/80916a1a4f9d8da6e542dd10be92f2ba31292e b/63/80916a1a4f9d8da6e542dd10be92f2ba31292e
new file mode 100644 (file)
index 0000000..77e1b19
--- /dev/null
@@ -0,0 +1,143 @@
+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 19EF5431FC9\r
+       for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 17:17:37 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.1\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       RCVD_IN_DNSWL_NONE=-0.0001] 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 nSdiMf0oJXFR for <notmuch@notmuchmail.org>;\r
+       Tue, 15 Jul 2014 17:17:33 -0700 (PDT)\r
+Received: from qmta07.emeryville.ca.mail.comcast.net\r
+       (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64])\r
+       by olra.theworths.org (Postfix) with ESMTP id DA279431FC0\r
+       for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 17:17:32 -0700 (PDT)\r
+Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89])\r
+       by qmta07.emeryville.ca.mail.comcast.net with comcast\r
+       id SnsH1o0021vN32cA7oHYSx; Wed, 16 Jul 2014 00:17:32 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta22.emeryville.ca.mail.comcast.net with comcast\r
+       id SoHX1o001152l3L8ioHXkE; Wed, 16 Jul 2014 00:17:32 +0000\r
+Received: by odin.tremily.us (Postfix, from userid 1000)\r
+       id D24C11295243; Tue, 15 Jul 2014 17:17:30 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+       t=1405469850; bh=dEK9AnJRrSA6unU41YugsVc9igTOJdQiatj3UhbglJ8=;\r
+       h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
+       b=hv3MCmHtrEVbkhoS86eQyCWWwyNNBhnrXuoZkdECe8wYJWPunjUP2dLRbPJsoybF0\r
+       KJmS6MarfAIypoWIEpwd957SlVz7fmbuFhshdtnV34OlDW5XZIlLfl9iutzbRh2/aH\r
+       fIMov6cnMkDxiH6yKDMHK71e1OmLIloRswEtAiIU=\r
+Date: Tue, 15 Jul 2014 17:17:30 -0700\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: David Bremner <bremner@debian.org>\r
+Subject: Re: [PATCH 3/4] nmbug: Catch stderr in is_unmerged\r
+Message-ID: <20140716001730.GI30232@odin>\r
+References: <cover.1404678709.git.wking@tremily.us>\r
+       <d55cf02465c5f2d83f2dd0bc666831ee524b0fb7.1404678709.git.wking@tremily.us>\r
+       <871ttm89nd.fsf@maritornes.cs.unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+       protocol="application/pgp-signature"; boundary="TA4f0niHM6tHt3xR"\r
+Content-Disposition: inline\r
+In-Reply-To: <871ttm89nd.fsf@maritornes.cs.unb.ca>\r
+OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
+       url=http://tremily.us/pubkey.txt\r
+User-Agent: Mutt/1.5.23 (2014-03-12)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20140121; t=1405469852;\r
+       bh=t7X1pZHdbWsxsdDpqp3PlQ9n+OuBTbTiYdwalQpjjBw=;\r
+       h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
+       MIME-Version:Content-Type;\r
+       b=C3FYyqdNup4BIYhezqorK4HpMJttH0nzOX2rLp36e87hYSj53rc/ldbl2HwzFDvNp\r
+       bEoD4+XUAvcyEv6Km1mWRb8vD+nEG3s0LZZXH8wE+eQBPqEow3CNlYfzPopTSsKVZ1\r
+       xb9FecTsKWTFM1+t4RYN/u3u2PczFyaFA3Xh7M9XaoeBA6skKODl3tYJJg8a8jYy6D\r
+       0PrElh6Upqc/Zu8NoYc/2cb9xtTpmS9eO1NSqJCuY0NJPlOWb7+PoEIGzyI6vNAquJ\r
+       1SWfOobFFEyEpnr6nmCta4mh78GmjFUCjJdGmYikNW+yNpdmWaiV2tRzOkrf3IHZjN\r
+       LRfydYhzgKj/w==\r
+Cc: notmuch@notmuchmail.org\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: Wed, 16 Jul 2014 00:17:37 -0000\r
+\r
+\r
+--TA4f0niHM6tHt3xR\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Tue, Jul 15, 2014 at 08:49:58PM -0300, David Bremner wrote:\r
+> "W. Trevor King" <wking@tremily.us> writes:\r
+>=20\r
+> > +  if ($dir eq '-2|') {\r
+> > +    $dir =3D '-|';\r
+> > +  }\r
+> > +\r
+>=20\r
+> I think I'd prefer an extra flag, rather than making new syntax.\r
+> The existing syntax is not pretty, but it is standard perl\r
+\r
+There should be standard Perl syntax for capturing both streams ;).  I\r
+can add a separate parameter instead, but Perl doesn't seem to have\r
+keyword-arguments.  At least, nmbug relies on assumptions about\r
+argument values:\r
+\r
+  sub git_pipe {\r
+    my $envref =3D (ref $_[0] eq 'HASH') ? shift : {};\r
+    my $ioref  =3D (ref $_[0] eq 'ARRAY') ? shift : undef;\r
+    my $dir =3D ($_[0] eq '-|' or $_[0] eq '|-') ? shift : undef;\r
+    =E2=80=A6\r
+  }\r
+\r
+to map positional arguments back into particular semantic meanings.\r
+That seemed ugly enough (can we only have a single boolean argument\r
+with this pattern?) that I'd prefer piggy-backing on Perl's\r
+stream-direction syntax.  But let me know what you like best, and I'll\r
+go that way with v2.  I'd be happy to rewrite nmbug in Python too,\r
+which has (to my eyes) much saner kwargs and subprocess handling.\r
+\r
+Cheers,\r
+Trevor\r
+\r
+--=20\r
+This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
+For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
+\r
+--TA4f0niHM6tHt3xR\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v2\r
+\r
+iQIcBAEBAgAGBQJTxcSZAAoJEG8/JgBt8ol8FPIQANNwWT84kmfekKyaKep6v4Af\r
+r+kyvbzu+HmYmEO6dVcfraMOj1nM1gJrsKXR7OnlPeEetmbTeixfSkXG4M7VYIcr\r
+LuPNSwYm5e13ZGoYiWeZP4bdWtsvOuR9qn66T/GCdsuX99vTNZsXPiyfuyx+FzZS\r
+C+ADb4kCeI1zI3zyFu6FmNA/pxBhSalFNZ7cMk76yVcT9Slq/dL57G/c3GjFx9hR\r
+0lQTILZ4tn5iHbFPxOVO/7grZTbDWox5qUaXiFtx5DHREfxF5TfCRJnPCzHvcIV3\r
+lle3WZiPMr0o3dc2PUmn2j7A49sM206lK//Z4WTkdzxZW2tI+bu8YMn5yCkHa+Ck\r
+3wJAO6HPJZ9ylGCyqLqSZ9WMILABwN3LaNlIMio/0llFRWzK0tZpzpUv76WO2cTo\r
+GGFFTEvWs4MqkPQEGU8iBLqv0+7T8c6m635vMIla9gn+u9C+2+74BV6/sUOhSRu1\r
+/BhoRVB2znRRnbVcpn/tTFJh4+PVmm+CmzfO99ugEqu69fRM5Qd+/zpRXYYopWpO\r
+kFQvyGfrLDHFXVIX48pMO8MsJ8fuTAHy9/QvFBro/Xr77iJ8Li8adCi7VXCDvVsK\r
+9CYq9NoZAjvM4KWKKzWd3DRt118dChOHGy3RPXFnzlCFyj+AjWVKVzMpD0GpgjUA\r
+t8HLgz8endMzhoi5tGLq\r
+=MGv8\r
+-----END PGP SIGNATURE-----\r
+\r
+--TA4f0niHM6tHt3xR--\r