Re: [PATCH 4/4] nmbug: Add an 'init' command
authorW. Trevor King <wking@tremily.us>
Wed, 16 Jul 2014 00:12:39 +0000 (17:12 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:41 +0000 (10:03 -0800)
4a/1b96e69758ad62b923f8ee790f1e46670560ae [new file with mode: 0644]

diff --git a/4a/1b96e69758ad62b923f8ee790f1e46670560ae b/4a/1b96e69758ad62b923f8ee790f1e46670560ae
new file mode 100644 (file)
index 0000000..25851ca
--- /dev/null
@@ -0,0 +1,141 @@
+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 BBB0F431FC7\r
+       for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 17:12:44 -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 DIk0qom4iqB8 for <notmuch@notmuchmail.org>;\r
+       Tue, 15 Jul 2014 17:12:41 -0700 (PDT)\r
+Received: from qmta14.emeryville.ca.mail.comcast.net\r
+       (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212])\r
+       by olra.theworths.org (Postfix) with ESMTP id F17B2431FC0\r
+       for <notmuch@notmuchmail.org>; Tue, 15 Jul 2014 17:12:40 -0700 (PDT)\r
+Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59])\r
+       by qmta14.emeryville.ca.mail.comcast.net with comcast\r
+       id SntS1o0031GXsucAEoCgqc; Wed, 16 Jul 2014 00:12:40 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta07.emeryville.ca.mail.comcast.net with comcast\r
+       id SoCf1o00K152l3L8UoCfZW; Wed, 16 Jul 2014 00:12:40 +0000\r
+Received: by odin.tremily.us (Postfix, from userid 1000)\r
+       id 6645112951F9; Tue, 15 Jul 2014 17:12:39 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
+       t=1405469559; bh=N3LGpV7sxu8Sx6w1J7XrxaAVulliLF6XWR7Rxnx3cEY=;\r
+       h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
+       b=RILcz77ipJ/0Bp45i0bGfx6IkjMJufzLJZSKMzZ+930SHeyNl6AZTozGrKJaULzgm\r
+       SMoK3k0UlLgm2sGnvoLyw6A6h1TrbsdtVobLcmKqH3BPjviSwZL9pL5/SRXIuXZrH5\r
+       ouo3QOwV2daglmPdHW+WKE4v9k3igRbO/a/jX1WI=\r
+Date: Tue, 15 Jul 2014 17:12:39 -0700\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: David Bremner <david@tethera.net>\r
+Subject: Re: [PATCH 4/4] nmbug: Add an 'init' command\r
+Message-ID: <20140716001239.GH30232@odin>\r
+References: <cover.1404678709.git.wking@tremily.us>\r
+       <05ccd672f55444f74da62250e2305fb84fdc6c42.1404678709.git.wking@tremily.us>\r
+       <87y4vu6uvf.fsf@maritornes.cs.unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; micalg=pgp-sha1;\r
+       protocol="application/pgp-signature"; boundary="JI+G0+mN8WmwPnOn"\r
+Content-Disposition: inline\r
+In-Reply-To: <87y4vu6uvf.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=1405469560;\r
+       bh=QYInJY/5NQAUy323uCpTsUi3X1CKQgTW7bIx9KpKf9s=;\r
+       h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
+       MIME-Version:Content-Type;\r
+       b=jAwZDkX+fP2FLvtkd0ookylXjIa+bloZNT2jLl6HqASuktQF3wKPsmrccI1nSJclE\r
+       mMoHHIJx6wC7oKtg2EMf3haiGnc0FGKxwsIDlu5jM7gR6kK+arxJRvTSK22Uh8lsNg\r
+       1t4cRlimFYU00hhfhkw9nndv8Tmm6LpyCNmWTIbIIkxHSGJrPx+TziXLdX0yhcwRik\r
+       bgl70Xv89Kq0ZJ98F9A/j558YgFmerEzM6EEV/V0OTKOSmXHVVVthdeFnz9NxZedni\r
+       932Xz+7F6QaC0nqLHS8uWgGZjVWAUNgWbYDX5oMTV32a6PrBdjMKmv6G1tRvjb0H3R\r
+       yRoo/GkwStvjQ==\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:12:44 -0000\r
+\r
+\r
+--JI+G0+mN8WmwPnOn\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Tue, Jul 15, 2014 at 08:54:28PM -0300, David Bremner wrote:\r
+> "W. Trevor King" <wking@tremily.us> writes:\r
+>=20\r
+> > +sub do_init {\r
+> > +  my $tempwork =3D tempdir ('/tmp/nmbug-init.XXXXXX', CLEANUP =3D> 1);\r
+> > +  system ('git', 'init', '--separate-git-dir', $NMBGIT, $tempwork) =3D=\r
+=3D 0\r
+> > +    or die "'git init' exited with nonzero value\n";\r
+> > +  git ('config', '--unset', 'core.worktree');\r
+> > +  git ('config', 'core.bare', 'true');\r
+> > +  # create an empty blob (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)\r
+> > +  git ('hash-object', '-w', '--stdin');\r
+> > +  git ( { GIT_WORK_TREE =3D> $tempwork }, 'commit', '--allow-empty',\r
+> > +        '-m', 'Start a new nmbug repository' );\r
+> > +}\r
+> > +\r
+>=20\r
+>=20\r
+> Shouldn't this empty blob already be created by the following line:\r
+>=20\r
+> my $EMPTYBLOB =3D git (qw{hash-object -t blob /dev/null});\r
+>=20\r
+> Or is the key point to write it into the database?  Anyway I like my\r
+> hack slightly better than yours ;).\r
+\r
+We need to write it to the database.  I'll use /dev/null in v2,\r
+though.\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
+--JI+G0+mN8WmwPnOn\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
+iQIcBAEBAgAGBQJTxcN2AAoJEG8/JgBt8ol8h9EP/jAohUiNTaDCtAMiUYnq9kpK\r
+5X1eqrcf5SoZ6K3e4bT+bbgBryIl0EGCLUvNCV0Rj/h32wGHPaHc7o1egMcQEBKU\r
+q6WGja0oLs+nn0qXRPPgqJ4kJhgGT9C+RdJhIPnoGfyDA2VN/81Zr/eE74kxlHzH\r
+/4PfSZK2Tzy2rALHAa13tct627P1eX23Yv/cRa2Vka4Qha4i9aA7NBCgspMGE1AZ\r
+JMZ0DoCMZnnTjY5UbkV2TaGyn5MyjRpvTD2FnyQeTngmFKEC/PQba+l+PQV+XKAI\r
+yxlRQHIFNKE0WPgWJaaUqhcInnhIGM3gclWs890Gg0unfI1QB76OlgDvYtvjAoZI\r
+tgNEGLdEWs3IwdynL5KkLyPY8YMX9jsMd2+qmWJUk3oyutC8z9sqNeEs8jPKhNoa\r
+gqB4Yp5A3MKBkZFq1rzZqasA9reB/1JarSHMIEAK9rxpACZiGe2y1799+hHkq5O7\r
+czU2vMPTreGB1QYe9TwTuzVRpwmXAuXuusjYkw/RccVwI5P15NU2jL+9FPGI888V\r
++pKpzQCUYbYXFno6006uq/OlH7xb/2WSldeQ0GMPHPEAUnKIgf04sa7FNCD1CJ95\r
+FBng6I5Ya2GsuXZHFeWqdBN8xAxLmQsK1+iIpZp+lo46jS0Fxg1kxpKRfcs/od7i\r
+1nyFsBqe5/QlMaslDb1N\r
+=vjXB\r
+-----END PGP SIGNATURE-----\r
+\r
+--JI+G0+mN8WmwPnOn--\r