Re: Filesystem functionality used by notmuch
[notmuch-archives.git] / 99 / bca8c1a6aa6db5302b701a5ec338b5c17fd7c6
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 AEC50431FC0\r
6         for <notmuch@notmuchmail.org>; Mon, 19 Jan 2015 09:05:10 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.338\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.338 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_NONE=-0.0001]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id JZVPe7DENam6 for <notmuch@notmuchmail.org>;\r
18         Mon, 19 Jan 2015 09:05:07 -0800 (PST)\r
19 Received: from resqmta-po-04v.sys.comcast.net (resqmta-po-04v.sys.comcast.net\r
20         [96.114.154.163])\r
21         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
22         (No client certificate requested)\r
23         by olra.theworths.org (Postfix) with ESMTPS id 21F6E431FBF\r
24         for <notmuch@notmuchmail.org>; Mon, 19 Jan 2015 09:05:07 -0800 (PST)\r
25 Received: from resomta-po-03v.sys.comcast.net ([96.114.154.227])\r
26         by resqmta-po-04v.sys.comcast.net with comcast\r
27         id ht471p0024ueUHc01t56fy; Mon, 19 Jan 2015 17:05:06 +0000\r
28 Received: from odin.tremily.us ([24.18.63.50])\r
29         by resomta-po-03v.sys.comcast.net with comcast\r
30         id ht541p00J152l3L01t54nz; Mon, 19 Jan 2015 17:05:06 +0000\r
31 Received: by odin.tremily.us (Postfix, from userid 1000)\r
32         id 4BC6115A58EF; Mon, 19 Jan 2015 08:55:35 -0800 (PST)\r
33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
34         t=1421686535; bh=C5Q2AVtyAg9RB6yLQcaTUSoKDohQGTCMLbD4Wf0Y5+M=;\r
35         h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
36         b=NwWMBuVEdrTOF+oRCRfgwCaLS9x4rHCZ0UeG9e99SiAMdkxf5gUgoTsdJDXCr37Br\r
37         DxyfujR2NFCyAjseUT4ah/Ov7mF/PkEd86EHzDdXuRtCXGcbAkqeSBjLbKM3zPZeno\r
38         sPDjOa1GtWuWUGYimHS1aII0TC3/mzsmA9Tik9QI=\r
39 Date: Mon, 19 Jan 2015 08:55:35 -0800\r
40 From: "W. Trevor King" <wking@tremily.us>\r
41 To: Tomi Ollila <tomi.ollila@iki.fi>\r
42 Subject: Re: [PATCH v4] nmbug: Add an 'init' command\r
43 Message-ID: <20150119165535.GR4613@odin.tremily.us>\r
44 References:\r
45  <b3d22d1d587a626e91f536f6393e476a41de84c9.1421627321.git.wking@tremily.us>\r
46         <m2oapvf6kv.fsf@guru.guru-group.fi>\r
47 MIME-Version: 1.0\r
48 Content-Type: multipart/signed; micalg=pgp-sha1;\r
49         protocol="application/pgp-signature"; boundary="phbq2bkSb+hZnunM"\r
50 Content-Disposition: inline\r
51 In-Reply-To: <m2oapvf6kv.fsf@guru.guru-group.fi>\r
52 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
53         url=http://tremily.us/pubkey.txt\r
54 User-Agent: Mutt/1.5.23 (2014-03-12)\r
55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
56         s=q20140121; t=1421687106;\r
57         bh=YcmPdqO+XiYFwmyUmLiQJAPZfc5QlP3XfUK3VioIFGM=;\r
58         h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
59         MIME-Version:Content-Type;\r
60         b=EP8wGdk9JL1dje+6OPmVGHJAdlfvslJMN3gBhEtNPhCOZjzzRzauzelz9rdbFhV8B\r
61         cndDbhEcHNqRRezaqFZiEL2gtliARdb5Vo1oYYhFPiiXH0LjBaY7PuYbe+iX7ft9XU\r
62         05eCpMW6a6psrVoIVXN7RbUEaBwArqYVXHrJHhpQSIncwZxXJsun30rlpDiC4xCkl3\r
63         wXGT3U0m+w8zqcBqox9Tg6NXpFabehAOWcUuS2Yb2V0B53vxv60Z+a2ebn+CzDNgha\r
64         7oRPSI1GW81SZA1hfX0e014NzCNvcl55YcsuKZHKhMr7nS3ti5FVAU5L4yDhauapuu\r
65         lw8wWMBDNMN4Q==\r
66 Cc: notmuch@notmuchmail.org\r
67 X-BeenThere: notmuch@notmuchmail.org\r
68 X-Mailman-Version: 2.1.13\r
69 Precedence: list\r
70 List-Id: "Use and development of the notmuch mail system."\r
71         <notmuch.notmuchmail.org>\r
72 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
74 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
75 List-Post: <mailto:notmuch@notmuchmail.org>\r
76 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
77 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
78         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
79 X-List-Received-Date: Mon, 19 Jan 2015 17:05:10 -0000\r
80 \r
81 \r
82 --phbq2bkSb+hZnunM\r
83 Content-Type: text/plain; charset=utf-8\r
84 Content-Disposition: inline\r
85 Content-Transfer-Encoding: quoted-printable\r
86 \r
87 On Mon, Jan 19, 2015 at 11:44:16AM +0200, Tomi Ollila wrote:\r
88 > $ python2.7 devel/nmbug/nmbug init\r
89 > Reinitialized existing Git repository in /home/too/.nmbug/\r
90 > e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\r
91 > user.name not defined\r
92 > [u'git', u'--git-dir', u'/home/too/.nmbug', u'commit', u'--allow-empty',\r
93 > u'-m', u'Start a new nmbug repository'] exited with 1\r
94 > zsh: exit 1     python2.7 devel/nmbug/nmbug init\r
95 >=20\r
96 > This is due to my default /path/to/git-templates/pre-commit\r
97 > forbidding commits unless I've configured user.name & user.email for\r
98 > that particular repository....\r
99 >=20\r
100 > I guess there is not much one can do to handle users' mystic global\r
101 > hooks -- I'll look (later) whether e.g. '--no-hooks' parameter could\r
102 > be given to nmbug from command line...\r
103 >=20\r
104 > ... Ok, it was --no-verify and patching that to the command line\r
105 > worked -- git complained that "Your name and email address were\r
106 > configured automatically based on your username and hostname..."=E2=80=A6\r
107 \r
108 Hmm.  My initial feeling is that if your pre-commit hook doesn't want\r
109 you to commit, we should respect that.  Although I'm not sure how to\r
110 handle this case for folks like you that don't define a global\r
111 username or email address.  Possibilities:\r
112 \r
113 * Drop the empty commit from =E2=80=98nmbug init=E2=80=99 and teach =E2=80=\r
114 =98nmbug log=E2=80=99,\r
115   =E2=80=98status=E2=80=99, =E2=80=98commit=E2=80=99, etc. to handle the =\r
116 =E2=80=9Cwe don't have any commits\r
117   yet=E2=80=9D case?  That gives you time between the init and first commit=\r
118  to\r
119   go into the repository and setup your username and email address by\r
120   hand.  This would be the most work, but gives us a more native\r
121   solution (=E2=80=98nmbug init=E2=80=99 maps more directly to =E2=80=98git=\r
122  init=E2=80=99).\r
123 \r
124 * Adjust the syntax to:\r
125 \r
126     nmbug init -- {arguments passed through to =E2=80=98git commit=E2=80=99}\r
127 \r
128   so you could run:\r
129 \r
130     nmbug init -- --author 'A U Thor <author@example.com>'\r
131 \r
132   or:\r
133 \r
134     nmbug init -- --no-verify\r
135 \r
136   this works as long as the tweak you need is accessible from a =E2=80=98git\r
137   commit=E2=80=99 argument (I guess --no-verify covers us there).\r
138 \r
139 > =E2=80=A6 but commit succeeded :).\r
140 \r
141 =46rom the template pre-commit.sample:\r
142 \r
143   The hook should exit with non-zero status after issuing an\r
144   appropriate message if it wants to stop the commit.\r
145 \r
146 so you should check that your hook is doing that if you expect to\r
147 abort commits it doesn't like ;).\r
148 \r
149 > I think it should be checked so that init on already-existing\r
150 > repository does not succeed.\r
151 \r
152 Good point.  I've added:\r
153 \r
154   if _os.path.exists(NMBGIT):\r
155       raise ValueError('NMBGIT path ({!r}) already exists'.format(NMBGIT))\r
156 \r
157 for v5.\r
158 \r
159 Cheers,\r
160 Trevor\r
161 \r
162 --=20\r
163 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
164 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
165 \r
166 --phbq2bkSb+hZnunM\r
167 Content-Type: application/pgp-signature; name="signature.asc"\r
168 Content-Description: OpenPGP digital signature\r
169 \r
170 -----BEGIN PGP SIGNATURE-----\r
171 Version: GnuPG v2\r
172 \r
173 iQIcBAEBAgAGBQJUvTcFAAoJEG8/JgBt8ol8nwMP/RgEvEO7EnDq1/CjsOjWvN+8\r
174 DzTPD3UIbahyytZr/wV+96rTO/z8X2Uj3GW3imSP3Moz9UP+v9tbzebRmwqFA+Nn\r
175 o8cA4meUGdlfIl8+2DwDKKh9brntHabVrhmub8Yz10b4zlRXuNP1YOkOE2v1MRxI\r
176 6w6DLQHPBuqWz79DnSl1x9ENfZ0f2lTey7nPbwnQ1KvnbcQKmDIMftX3V96bxUQ2\r
177 8UJRCFIGoshOeZLUaf27czxP7gguV6vmKlRDPNl98VqEG6oYAkDZ5xxNfM2Nxqan\r
178 ZfzJA6vMTmuaAW9y8ReVlKyqaLUz2mEznR8a6uxIBKAc8561r3GfzXE+ggzaG1eq\r
179 rzDEzzPtsCZ8iaik0mFP8HZ/lmsXI4eQG2/TtoRB8qx/wfEwDZUaUSS+00MQJaC2\r
180 1AjEeQ9Om+Onm1xFp8lFbZ5fjd1NbUDEBemgzol7vSueC0qM0pQWEP3cIAzTTafy\r
181 xeb/HxdCduRvp/cy+yjDPgUWyWGGGBIxqKkSD+REBKKBGBUKHfjbDjknusLqYgdD\r
182 snpQGA/Ic1RL40OTXaF2toxDlUeycXOl0ggI1CX0DW9eFfMDHxdzY1OX0D/yQo+V\r
183 ToNGZKp/4BdhxYm3Tja5k8e8c8BXns14TSCS5E1o/WFF8UHEaGrNO48MjEzPA2Cj\r
184 No9YFjQX0kOnKvkjQ/TJ\r
185 =C9ca\r
186 -----END PGP SIGNATURE-----\r
187 \r
188 --phbq2bkSb+hZnunM--\r