Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 8b / b892654a9994c63f385e01fe27671552838e35
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 70EDC431FC7\r
6         for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 17:11: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: -0.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 2JpD7mST2wrY for <notmuch@notmuchmail.org>;\r
17         Tue, 15 Jul 2014 17:11:05 -0700 (PDT)\r
18 Received: from qmta12.emeryville.ca.mail.comcast.net\r
19         (qmta12.emeryville.ca.mail.comcast.net [76.96.27.227])\r
20         by olra.theworths.org (Postfix) with ESMTP id B4D6C431FC0\r
21         for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 17:11:05 -0700 (PDT)\r
22 Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59])\r
23         by qmta12.emeryville.ca.mail.comcast.net with comcast\r
24         id Smxo1o0051GXsuc01oB4w9; Wed, 16 Jul 2014 00:11:04 +0000\r
25 Received: from odin.tremily.us ([24.18.63.50])\r
26         by omta07.emeryville.ca.mail.comcast.net with comcast\r
27         id SoB21o00R152l3L8UoB3H1; Wed, 16 Jul 2014 00:11:04 +0000\r
28 Received: by odin.tremily.us (Postfix, from userid 1000)\r
29         id 3B8BF12951C5; Tue, 15 Jul 2014 17:11:02 -0700 (PDT)\r
30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
31         t=1405469462; bh=PGp8ctgL0TGrS2I3am+TsMBelbccihS46DT5p1LM13M=;\r
32         h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
33         b=nhmTbObCyMUBftpY02HftNf0jN4suvkwL//TcEqZF5W94zBB9+wQw4fPoW4/n0F2A\r
34         zG2Vaa1L/DReOdvv5l7a3tlU9k+f8MncosBZHMi0FDz9SJirr+r+EDUZS63h+fUWQC\r
35         UlVawrf1489WIe4kqid4jm30bbAeU40JEaGQkhyc=\r
36 Date: Tue, 15 Jul 2014 17:11:02 -0700\r
37 From: "W. Trevor King" <wking@tremily.us>\r
38 To: David Bremner <bremner@debian.org>\r
39 Subject: Re: [PATCH 2/4] nmbug: Handle missing @upstream in is_unmerged\r
40 Message-ID: <20140716001102.GG30232@odin>\r
41 References: <cover.1404678709.git.wking@tremily.us>\r
42         <f96d39a63a505216141bd2daaf3a52e066713296.1404678709.git.wking@tremily.us>\r
43         <874myi89vu.fsf@maritornes.cs.unb.ca>\r
44 MIME-Version: 1.0\r
45 Content-Type: multipart/signed; micalg=pgp-sha1;\r
46         protocol="application/pgp-signature"; boundary="nqkreNcslJAfgyzk"\r
47 Content-Disposition: inline\r
48 In-Reply-To: <874myi89vu.fsf@maritornes.cs.unb.ca>\r
49 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
50         url=http://tremily.us/pubkey.txt\r
51 User-Agent: Mutt/1.5.23 (2014-03-12)\r
52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
53         s=q20140121; t=1405469464;\r
54         bh=cNe6mQ4E5JpwaiDkUtSzOR8af1KhWD04CGwBY5WJu/A=;\r
55         h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
56         MIME-Version:Content-Type;\r
57         b=HuXFxlt6Txk6nueR8Mum4c2fMywa2JDRcN4aAHsdVvxrAhbpeFdP+YdXIb8sSR7eP\r
58         wyqL5sRE6fZobt2Lmt4//gv/VeXOKYmjKKklqXxMNN66hp2wK/GNDXvCctExhDVXOP\r
59         TbNpUsQbRhdKMdh/qBXuq9k6uprmodBKepaACLmccgynpYkTEmRw7Lo2CX74iDUTje\r
60         mgBKjx+vGyyArUBXCLDM1BbHUu3EEzJovP2zCm+Q948KTsNmsUPJmfwx+0fEnpc/LR\r
61         IN0Ik/2SC1dmCw0XQf3kTDmQeHJfHVf389JAqsImb6S7aCMSYqm4S2MR65VAVIurs7\r
62         fk7GzDo+sYMcQ==\r
63 Cc: notmuch@notmuchmail.org\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Wed, 16 Jul 2014 00:11:09 -0000\r
77 \r
78 \r
79 --nqkreNcslJAfgyzk\r
80 Content-Type: text/plain; charset=utf-8\r
81 Content-Disposition: inline\r
82 Content-Transfer-Encoding: quoted-printable\r
83 \r
84 On Tue, Jul 15, 2014 at 08:44:53PM -0300, David Bremner wrote:\r
85 > W. Trevor King writes:\r
86 > > -  my $fetch_head =3D git ('rev-parse', $commit);\r
87 > > +  my ($fetch_head, $status) =3D git_with_status ('rev-parse', $commit);\r
88 > > +  if ($status) {\r
89 > > +    return 0;\r
90 > > +  }\r
91 >=20\r
92 > Could there be other errors here, other than @{upstream} not\r
93 > existing?  At first glance it seems like there is potential to hide\r
94 > errors here.\r
95 \r
96 Possible errors that I can find:\r
97 \r
98 * fatal: Not a git repository: =E2=80=A6 (with a poor GIT_DIR config)\r
99 * fatal: ambiguous argument =E2=80=A6 (with an invalid/missing revision nam=\r
100 e)\r
101 * fatal: No upstream configured for branch =E2=80=A6 (when\r
102   branch.<name>.remote or branch.<name>.merge aren't set)\r
103 \r
104 All of which return 128 as of Git v1.9.1.  We're only interested in\r
105 the last.  I'm fine looking for =E2=80=9CNo upstream configured for branch=\r
106 =E2=80=9D\r
107 after we capture stderr with =E2=80=9Cnmbug: Catch stderr in is_unmerged=E2=\r
108 =80=9D [1],\r
109 but I don't expect the other two error cases to happen very often.  At\r
110 least, I doubt you could get this far into do_status with a broken\r
111 GIT_DIR, and we're hard-coding '@{upstream}' here.\r
112 \r
113 Cheers,\r
114 Trevor\r
115 \r
116 [1]: id:d55cf02465c5f2d83f2dd0bc666831ee524b0fb7.1404678709.git.wking@tremi=\r
117 ly.us\r
118      http://article.gmane.org/gmane.mail.notmuch.general/18627\r
119 \r
120 --=20\r
121 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
122 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
123 \r
124 --nqkreNcslJAfgyzk\r
125 Content-Type: application/pgp-signature; name="signature.asc"\r
126 Content-Description: OpenPGP digital signature\r
127 \r
128 -----BEGIN PGP SIGNATURE-----\r
129 Version: GnuPG v2\r
130 \r
131 iQIcBAEBAgAGBQJTxcMUAAoJEG8/JgBt8ol8mSYP/RXAhtEQ8KdL7nqo/Q2VpNhQ\r
132 s7wxanlzA4TmQ9ABQAtp5HlmpOo+4znMB8pD3DleHUDVIEIvCTjKdPVMI1ip4Ig3\r
133 UfUoRwniFZcIGoR/wwtTi7im+9BQHIdvwj/mUpYM8iqGPOijEbPuWvtENJv9enOa\r
134 XIcI4RDLFwqwmXjyz0pP4jvO63ZuVUkywZXhEnpljSezLCIwMOG9+EhUHQM+Q4lM\r
135 MDRaVmq3ORFYKsOuhXFitTBP1CNjx0YOYkOHdRfTeNqDVnXkqIjnfMf/iIP9KKql\r
136 bSyCkbqRtvbRtR1IomSETCSOr6G7z9huhFKfirIXdY0mS849UW4l8pggFtMjRF3G\r
137 9QNMRyI1hIoIl6k8GBEhRAN0yWNEyhStha/16ZUIBJZ/bYo1xpOsKiSLhSVv7o7Q\r
138 N0zqbNzwAiYWJBTtYjKYfK2o65nTJQ2DhqkSNkbue1WGXhqXXQpkFFXBbNEzQQlk\r
139 6q8fr47CMyDVldOh5719pKcu2Fm+05VgbYlPLq2rr3dFxTBBDsQ+KFdWtVl/vx8B\r
140 VqXkpnPUi8/ppMTXvIZBxXLpdCRyMX2ZYjJvs4RA/JYmIbPGdfBObExez1UH7e1Y\r
141 cNjoXSD5/3GyRnVsDC4dfXmGb6FpemmWA3E68NESuEDsSrwDJndKhfR28cL7T+ve\r
142 SecxTNpwbcdMYtPeztDz\r
143 =9aiG\r
144 -----END PGP SIGNATURE-----\r
145 \r
146 --nqkreNcslJAfgyzk--\r