Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BBB0F431FC7 for ; Tue, 15 Jul 2014 17:12:44 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DIk0qom4iqB8 for ; Tue, 15 Jul 2014 17:12:41 -0700 (PDT) Received: from qmta14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by olra.theworths.org (Postfix) with ESMTP id F17B2431FC0 for ; Tue, 15 Jul 2014 17:12:40 -0700 (PDT) Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by qmta14.emeryville.ca.mail.comcast.net with comcast id SntS1o0031GXsucAEoCgqc; Wed, 16 Jul 2014 00:12:40 +0000 Received: from odin.tremily.us ([24.18.63.50]) by omta07.emeryville.ca.mail.comcast.net with comcast id SoCf1o00K152l3L8UoCfZW; Wed, 16 Jul 2014 00:12:40 +0000 Received: by odin.tremily.us (Postfix, from userid 1000) id 6645112951F9; Tue, 15 Jul 2014 17:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin; t=1405469559; bh=N3LGpV7sxu8Sx6w1J7XrxaAVulliLF6XWR7Rxnx3cEY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=RILcz77ipJ/0Bp45i0bGfx6IkjMJufzLJZSKMzZ+930SHeyNl6AZTozGrKJaULzgm SMoK3k0UlLgm2sGnvoLyw6A6h1TrbsdtVobLcmKqH3BPjviSwZL9pL5/SRXIuXZrH5 ouo3QOwV2daglmPdHW+WKE4v9k3igRbO/a/jX1WI= Date: Tue, 15 Jul 2014 17:12:39 -0700 From: "W. Trevor King" To: David Bremner Subject: Re: [PATCH 4/4] nmbug: Add an 'init' command Message-ID: <20140716001239.GH30232@odin> References: <05ccd672f55444f74da62250e2305fb84fdc6c42.1404678709.git.wking@tremily.us> <87y4vu6uvf.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JI+G0+mN8WmwPnOn" Content-Disposition: inline In-Reply-To: <87y4vu6uvf.fsf@maritornes.cs.unb.ca> OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8; url=http://tremily.us/pubkey.txt User-Agent: Mutt/1.5.23 (2014-03-12) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1405469560; bh=QYInJY/5NQAUy323uCpTsUi3X1CKQgTW7bIx9KpKf9s=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=jAwZDkX+fP2FLvtkd0ookylXjIa+bloZNT2jLl6HqASuktQF3wKPsmrccI1nSJclE mMoHHIJx6wC7oKtg2EMf3haiGnc0FGKxwsIDlu5jM7gR6kK+arxJRvTSK22Uh8lsNg 1t4cRlimFYU00hhfhkw9nndv8Tmm6LpyCNmWTIbIIkxHSGJrPx+TziXLdX0yhcwRik bgl70Xv89Kq0ZJ98F9A/j558YgFmerEzM6EEV/V0OTKOSmXHVVVthdeFnz9NxZedni 932Xz+7F6QaC0nqLHS8uWgGZjVWAUNgWbYDX5oMTV32a6PrBdjMKmv6G1tRvjb0H3R yRoo/GkwStvjQ== Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 00:12:44 -0000 --JI+G0+mN8WmwPnOn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 15, 2014 at 08:54:28PM -0300, David Bremner wrote: > "W. Trevor King" writes: >=20 > > +sub do_init { > > + my $tempwork =3D tempdir ('/tmp/nmbug-init.XXXXXX', CLEANUP =3D> 1); > > + system ('git', 'init', '--separate-git-dir', $NMBGIT, $tempwork) =3D= =3D 0 > > + or die "'git init' exited with nonzero value\n"; > > + git ('config', '--unset', 'core.worktree'); > > + git ('config', 'core.bare', 'true'); > > + # create an empty blob (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391) > > + git ('hash-object', '-w', '--stdin'); > > + git ( { GIT_WORK_TREE =3D> $tempwork }, 'commit', '--allow-empty', > > + '-m', 'Start a new nmbug repository' ); > > +} > > + >=20 >=20 > Shouldn't this empty blob already be created by the following line: >=20 > my $EMPTYBLOB =3D git (qw{hash-object -t blob /dev/null}); >=20 > Or is the key point to write it into the database? Anyway I like my > hack slightly better than yours ;). We need to write it to the database. I'll use /dev/null in v2, though. Cheers, Trevor --=20 This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy --JI+G0+mN8WmwPnOn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTxcN2AAoJEG8/JgBt8ol8h9EP/jAohUiNTaDCtAMiUYnq9kpK 5X1eqrcf5SoZ6K3e4bT+bbgBryIl0EGCLUvNCV0Rj/h32wGHPaHc7o1egMcQEBKU q6WGja0oLs+nn0qXRPPgqJ4kJhgGT9C+RdJhIPnoGfyDA2VN/81Zr/eE74kxlHzH /4PfSZK2Tzy2rALHAa13tct627P1eX23Yv/cRa2Vka4Qha4i9aA7NBCgspMGE1AZ JMZ0DoCMZnnTjY5UbkV2TaGyn5MyjRpvTD2FnyQeTngmFKEC/PQba+l+PQV+XKAI yxlRQHIFNKE0WPgWJaaUqhcInnhIGM3gclWs890Gg0unfI1QB76OlgDvYtvjAoZI tgNEGLdEWs3IwdynL5KkLyPY8YMX9jsMd2+qmWJUk3oyutC8z9sqNeEs8jPKhNoa gqB4Yp5A3MKBkZFq1rzZqasA9reB/1JarSHMIEAK9rxpACZiGe2y1799+hHkq5O7 czU2vMPTreGB1QYe9TwTuzVRpwmXAuXuusjYkw/RccVwI5P15NU2jL+9FPGI888V +pKpzQCUYbYXFno6006uq/OlH7xb/2WSldeQ0GMPHPEAUnKIgf04sa7FNCD1CJ95 FBng6I5Ya2GsuXZHFeWqdBN8xAxLmQsK1+iIpZp+lo46jS0Fxg1kxpKRfcs/od7i 1nyFsBqe5/QlMaslDb1N =vjXB -----END PGP SIGNATURE----- --JI+G0+mN8WmwPnOn--