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 C0F7B431FBD
\r
6 for <notmuch@notmuchmail.org>; Sun, 6 Jul 2014 13:48:58 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5
\r
13 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]
\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 qBvRrPVHO24L for <notmuch@notmuchmail.org>;
\r
18 Sun, 6 Jul 2014 13:48:52 -0700 (PDT)
\r
19 Received: from qmta15.westchester.pa.mail.comcast.net
\r
20 (qmta15.westchester.pa.mail.comcast.net [76.96.59.228])
\r
21 by olra.theworths.org (Postfix) with ESMTP id B23D0431FAF
\r
22 for <notmuch@notmuchmail.org>; Sun, 6 Jul 2014 13:48:52 -0700 (PDT)
\r
23 Received: from omta13.westchester.pa.mail.comcast.net ([76.96.62.52])
\r
24 by qmta15.westchester.pa.mail.comcast.net with comcast
\r
25 id P8iR1o00117dt5G5F8osKw; Sun, 06 Jul 2014 20:48:52 +0000
\r
26 Received: from odin.tremily.us ([24.18.63.50])
\r
27 by omta13.westchester.pa.mail.comcast.net with comcast
\r
28 id P8or1o001152l3L3Z8orwA; Sun, 06 Jul 2014 20:48:52 +0000
\r
29 Received: from mjolnir.tremily.us (unknown [192.168.0.140])
\r
30 by odin.tremily.us (Postfix) with ESMTPS id 87A4612700EB;
\r
31 Sun, 6 Jul 2014 13:41:01 -0700 (PDT)
\r
32 Received: (nullmailer pid 1926 invoked by uid 1000);
\r
33 Sun, 06 Jul 2014 20:40:28 -0000
\r
34 From: "W. Trevor King" <wking@tremily.us>
\r
35 To: notmuch@notmuchmail.org
\r
36 Subject: [PATCH 4/4] nmbug: Add an 'init' command
\r
37 Date: Sun, 6 Jul 2014 13:40:22 -0700
\r
39 <05ccd672f55444f74da62250e2305fb84fdc6c42.1404678709.git.wking@tremily.us>
\r
40 X-Mailer: git-send-email 1.9.1.353.gc66d89d
\r
41 In-Reply-To: <cover.1404678709.git.wking@tremily.us>
\r
42 References: <cover.1404678709.git.wking@tremily.us>
\r
43 In-Reply-To: <cover.1404678709.git.wking@tremily.us>
\r
44 References: <cover.1404678709.git.wking@tremily.us>
\r
45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
\r
46 s=q20140121; t=1404679732;
\r
47 bh=dn0RS2rWBoS7td+5aPxlmgggg5QBozIpMaUOv2R3px4=;
\r
48 h=Received:Received:Received:Received:From:To:Subject:Date:
\r
50 b=PpE88UfamcI/+4wCrdmElSydAXGFEl1MP21FdDFa37EFs2Fnc3B+bXqA9suv5TMMd
\r
51 BIcrdGfTk/0rgnIKySexA0IJ2f8+t0Ljm2GhwBZc6nRDm7vfoGAC3uBW3B9TMnSGcg
\r
52 XUmQlIJ8jmZ0E6A0RMXV+bXd38DHvtJqdjmJaS2pIhPFi4I8msOy/UpLRav5pzZXJq
\r
53 yuUF6lQrvHwTcXlYRVBftQrzYVUw+L3WDXARzw/CWmj28bGqsvJzVDypfR+EdMV0t9
\r
54 WuUrSv61C4/e7yoZgcDAjzYDmmUto1tjiDQIcsbN6YHMmxj7ug/5zyGiIuC29sPB7M
\r
56 Cc: David Bremner <bremner@debian.org>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Sun, 06 Jul 2014 20:48:58 -0000
\r
71 For folks that want to start versioning a new tag-space, instead of
\r
72 cloning one that someone else has already started.
\r
74 The empty-blob hash-object call avoids errors like:
\r
77 error: invalid object 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 for 'tags/...'
\r
78 fatal: git-write-tree: error building trees
\r
79 'git HASH(0x9ef3eb8) write-tree' exited with nonzero value
\r
81 devel/nmbug/nmbug | 19 +++++++++++++++++++
\r
82 1 file changed, 19 insertions(+)
\r
84 diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug
\r
85 index c9ac046..b64dab9 100755
\r
86 --- a/devel/nmbug/nmbug
\r
87 +++ b/devel/nmbug/nmbug
\r
88 @@ -30,6 +30,7 @@ my %command = (
\r
89 commit => \&do_commit,
\r
90 fetch => \&do_fetch,
\r
92 + init => \&do_init,
\r
94 merge => \&do_merge,
\r
96 @@ -152,6 +153,18 @@ sub do_clone {
\r
97 git ('config', 'core.bare', 'true');
\r
101 + my $tempwork = tempdir ('/tmp/nmbug-init.XXXXXX', CLEANUP => 1);
\r
102 + system ('git', 'init', '--separate-git-dir', $NMBGIT, $tempwork) == 0
\r
103 + or die "'git init' exited with nonzero value\n";
\r
104 + git ('config', '--unset', 'core.worktree');
\r
105 + git ('config', 'core.bare', 'true');
\r
106 + # create an empty blob (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
\r
107 + git ('hash-object', '-w', '--stdin');
\r
108 + git ( { GIT_WORK_TREE => $tempwork }, 'commit', '--allow-empty',
\r
109 + '-m', 'Start a new nmbug repository' );
\r
113 my $status = shift;
\r
114 return scalar (@{$status->{added}} ) + scalar (@{$status->{deleted}} ) == 0;
\r
115 @@ -610,6 +623,12 @@ Create a local nmbug repository from a remote source. This wraps
\r
116 C<git clone>, adding some options to avoid creating a working tree
\r
117 while preserving remote-tracking branches and upstreams.
\r
121 +Create a local nmbug repository from scratch. This wraps C<git init>
\r
122 +and performs other setup to support subsequent status and commit
\r
127 Update the notmuch database from git. This is mainly useful to discard
\r