Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f7 / 6f14c12e819ef2b46e23d8aa3f8cfeece4053e
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 1251A431FBD\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 08:26:41 -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: -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 F6OI3rUsabkn for <notmuch@notmuchmail.org>;\r
17         Sat,  8 Mar 2014 08:26:37 -0800 (PST)\r
18 Received: from qmta10.westchester.pa.mail.comcast.net\r
19         (qmta10.westchester.pa.mail.comcast.net [76.96.62.17])\r
20         by olra.theworths.org (Postfix) with ESMTP id 694E7431FB6\r
21         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 08:26:37 -0800 (PST)\r
22 Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73])\r
23         by qmta10.westchester.pa.mail.comcast.net with comcast\r
24         id b3qX1n0031ap0As5A4Sd3F; Sat, 08 Mar 2014 16:26:37 +0000\r
25 Received: from odin.tremily.us ([24.18.63.50])\r
26         by omta22.westchester.pa.mail.comcast.net with comcast\r
27         id b4Sb1n00Q152l3L3i4Sc38; Sat, 08 Mar 2014 16:26:36 +0000\r
28 Received: by odin.tremily.us (Postfix, from userid 1000)\r
29         id 046D6106C13B; Sat,  8 Mar 2014 08:26:33 -0800 (PST)\r
30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
31         t=1394295994; bh=nmXB2/JbhnASZIqNIrx31WEBxQcF10q7oRBIS+yChb8=;\r
32         h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
33         b=n+ZRmQqgRk7A65jn3K1LAkbpBI6uh6o1eA9RGI+cb/3a9lixCI1F97c9VAoOvIbMB\r
34         dfQgRp26vuLNKh6sOTD3utORWHzWA9KibZqiwwVyXSM8xmKHEIMQHKcZ6DQyuvR0K3\r
35         P8AnN72M+SNjV3obivGyzQdFtyv4S6MCea9hDJl8=\r
36 Date: Sat, 8 Mar 2014 08:26:33 -0800\r
37 From: "W. Trevor King" <wking@tremily.us>\r
38 To: David Bremner <david@tethera.net>\r
39 Subject: Re: [PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with\r
40  @{upstream}\r
41 Message-ID: <20140308162633.GM16433@odin.tremily.us>\r
42 References:\r
43  <80db13662a0313711ca3a91e338a63d35e64a83c.1391898002.git.wking@tremily.us>\r
44         <87siqsrhch.fsf@zancas.localnet>\r
45 MIME-Version: 1.0\r
46 Content-Type: multipart/signed; micalg=pgp-sha1;\r
47         protocol="application/pgp-signature"; boundary="dp9QYJgVRVEW2bsm"\r
48 Content-Disposition: inline\r
49 In-Reply-To: <87siqsrhch.fsf@zancas.localnet>\r
50 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
51         url=http://tremily.us/pubkey.txt\r
52 User-Agent: Mutt/1.5.22 (2013-10-16)\r
53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
54         s=q20121106; t=1394295997;\r
55         bh=NqZRVi0pfJjp+0Bs8qtPjbOVzrMEm97OajCLGjXRrZ4=;\r
56         h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
57         MIME-Version:Content-Type;\r
58         b=BD8cdWuqViy+zrKveEYieurl9KmBfymSqVw1tbE7OhYMdw5HO47CYyGnsgCwmr9Ek\r
59         blcwXbjgEzG891fG5IhN3ArOEH3Vp7PCVg1m+pqkR/ymeJ75Ce0UIBou4ne/nXpeO6\r
60         pxMeeQvyHK3vJ11wqc74LEbxIczipRhgntuKmtZKaJwyYHugqYteMjO8gGoXLG8ANq\r
61         UZYgc3TN9s8mrsMWT/RW/+1DrXUU9KcvQ/uiLImJu1JupigBiXHUDhHLuS+YB/FLVF\r
62         qA6LGHBHQV29rK/8kk9YIS7kiFFvCa+uLGC53oxsy3Xyf/D1xW/QI/AYdORfjVHs73\r
63         Usc88vgM9LjZA==\r
64 Cc: notmuch@notmuchmail.org\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Sat, 08 Mar 2014 16:26:41 -0000\r
78 \r
79 \r
80 --dp9QYJgVRVEW2bsm\r
81 Content-Type: text/plain; charset=utf-8\r
82 Content-Disposition: inline\r
83 Content-Transfer-Encoding: quoted-printable\r
84 \r
85 On Sat, Mar 08, 2014 at 08:43:26AM -0400, David Bremner wrote:\r
86 > W. Trevor King writes:\r
87 > > +sub do_clone {\r
88 > > +  my $repository =3D shift;\r
89 > > +  system ('git', 'clone', '--bare', $repository, $NMBGIT) =3D=3D 0\r
90 > > +    or die "'git clone' exited with nonzero value\n";\r
91 > > +  my $branch =3D git ('symbolic-ref', 'HEAD');\r
92 > > +  $branch =3D~ s|^refs/heads/||;\r
93 > > +  git ('config', 'remote.origin.fetch', '+refs/heads/*:refs/remotes/or=\r
94 igin/*');\r
95 > > +  git ('config', "branch.$branch.remote", 'origin');\r
96 > > +  git ('config', "branch.$branch.merge", 'refs/heads/$branch');\r
97 > > +  do_fetch();\r
98 \r
99 Oops, it looks like I used a tab instead of two spaces to indent\r
100 do_fetch.  I'll fix that in v2.\r
101 \r
102 > > +}\r
103 >=20\r
104 > I think doing a fetch immediately after a clone deserves a comment.\r
105 \r
106 I commented in the commit message.  Basically everything from =E2=80=9COne\r
107 tricky bit is that bare repositories don't set upstream tracking\r
108 branches by default=E2=80=9D down through =E2=80=9Cgives us the master-bran=\r
109 ch commit.=E2=80=9D\r
110 is describing what's going on here, and why I made these changes.\r
111 \r
112 On the other hand, perhaps this is too many hoops to jump through to\r
113 get upstreams without a working directory.  As an alternative\r
114 approach, we could drop --bare and use --no-checkout on the clone.\r
115 That would also let us avoid the bare-recovery config adjustments and\r
116 follow-up fetch.  With do_clone reduced to just wrapping the 'git\r
117 clone' command, we could remove it and just recommend folks run:\r
118 \r
119   $ git clone --no-checkout http://nmbug.tethera.net/git/nmbug-tags.git ~/.=\r
120 nmbug\r
121 \r
122 That's going to create ~/.nmbug/.git though, if we want to preserve\r
123 the current bare-style ~/.nmbug/ layout, we'd need something like:\r
124 \r
125   $ TEMPDIR=3D$(mktemp -d)\r
126   $ git clone --no-checkout --separate-git-dir=3D~/.nmbug \\r
127   >   http://nmbug.tethera.net/git/nmbug-tags.git "${TEMPDIR}/nmbug"\r
128   $ rm -rf "${TEMPDIR}"\r
129 \r
130 If we go the --separate-git-dir route, I think we're better off hiding\r
131 that in Perl ;).\r
132 \r
133 Of the three approaches:\r
134 \r
135 1. git clone --bare =E2=80=A6, tweak configs, and git fetch\r
136 2. git clone --nocheckout =E2=80=A6\r
137 3. git clone --nocheckout --separate-git-dir =E2=80=A6\r
138 \r
139 I prefer the third, but I'm happy with any of them.\r
140 \r
141 > > @@ -473,7 +487,7 @@ sub diff_index {\r
142 > >  sub diff_refs {\r
143 > >    my $filter =3D shift;\r
144 > >    my $ref1 =3D shift || 'HEAD';\r
145 > > -  my $ref2 =3D shift || 'FETCH_HEAD';\r
146 > > +  my $ref2 =3D shift || '@{upstream}';\r
147 >=20\r
148 > I wonder about hard-coding '@{upstream}' in several places. What do\r
149 > you think about a global "constant"? OF course it was hard-coded\r
150 > FETCH_HEAD before, but I think not in quite as many places.\r
151 \r
152 In the three non-comment places where I've hard-coded it, it's just a\r
153 default in the case that the caller left that argument empty.  In the\r
154 two comment places where I've hard-coded it, one is just mentioning\r
155 that it is the default, and the other is giving it as a useful\r
156 example.  I don't think that calls for another layer of indirection.\r
157 \r
158 Cheers,\r
159 Trevor\r
160 \r
161 --=20\r
162 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
163 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
164 \r
165 --dp9QYJgVRVEW2bsm\r
166 Content-Type: application/pgp-signature; name="signature.asc"\r
167 Content-Description: OpenPGP digital signature\r
168 \r
169 -----BEGIN PGP SIGNATURE-----\r
170 Version: GnuPG v2.0.22 (GNU/Linux)\r
171 \r
172 iQIcBAEBAgAGBQJTG0S3AAoJEKKfehoaNkbt4bYP/3vMIr+4d7pfdJzyfuz5Ezcp\r
173 jiWeY6PD/O5XDIBxu4FfxsW7czMO/PZ1Om334M6VgmeE24Xl/y+a6FMf2f6FcQ7z\r
174 /8g1vhzQJBo8iqcBJ72LPH+97suNK72tywEWt9Mzvyjwk5kl/ngn+zeD3fwCrBKD\r
175 /4Z+cy42p84TkD69QJefOCAWeStHWIzJPFPPwxworY9rOigADklhoVsoZU55J1EM\r
176 ySFsSW72N8wsf65qbjnuhwihOG9Hs6fcpHiqvgssEKwpEqtyvCO9Ide4YcqMfd17\r
177 9i/iA4VqDaSEfFZqd4Yx3g192MCvft7g8AVQJw5VTWr9oodos2NYHeaNYdmPh+Y5\r
178 gGqF/3YRPjXzFMyySljYjDO08jZrKMUHESAJ1SMbzDALnLgIA0+KMYkZBza7o05q\r
179 /dkYpfBF1h4Zuj7cTHU/Cg/LmqpPtQiP4EPRkGa2Y7NnLcEb8jfdlHqpNx/PmFfG\r
180 q3HAILQsJnGTg2I4s9wDRFuKIvEQL8uI0Ygl8LLS85wWN7f2nagNs9MExQs7otrs\r
181 MFcAvN6m8SztBqAWRZ/ZkUx3LphQfhRy3qrnpHeT6wJQLfhXl7qhyTceadFBDvGQ\r
182 Q8/tWV3q7tMtuwIQE7J9YtX2DbcQeT9Vf/NnaK2H0EMrSvr5eLNbvppe4WigqZ4P\r
183 EXDgc9+5HWv1/35EFe4L\r
184 =GZ0q\r
185 -----END PGP SIGNATURE-----\r
186 \r
187 --dp9QYJgVRVEW2bsm--\r