Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 77 / 163c9b1c4f5658b2d8cef4fcc1043ed7ec8a46
1 Return-Path: <david@tethera.net>\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 B42CC431FBD\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 04:43:40 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id Gv0-hjyu7YvC for <notmuch@notmuchmail.org>;\r
16         Sat,  8 Mar 2014 04:43:33 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 61152431FB6\r
21         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 04:43:33 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <david@tethera.net>)\r
24         id 1WMGbC-0003DJ-Kt; Sat, 08 Mar 2014 08:43:30 -0400\r
25 Received: (nullmailer pid 20837 invoked by uid 1000); Sat, 08 Mar 2014\r
26         12:43:26 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: "W. Trevor King" <wking@tremily.us>, notmuch@notmuchmail.org\r
29 Subject: Re: [PATCH] nmbug: Add 'clone' and replace FETCH_HEAD with\r
30  @{upstream}\r
31 In-Reply-To:\r
32  <80db13662a0313711ca3a91e338a63d35e64a83c.1391898002.git.wking@tremily.us>\r
33 References:\r
34  <80db13662a0313711ca3a91e338a63d35e64a83c.1391898002.git.wking@tremily.us>\r
35 User-Agent: Notmuch/0.17+106~g0421995 (http://notmuchmail.org) Emacs/24.3.1\r
36         (x86_64-pc-linux-gnu)\r
37 Date: Sat, 08 Mar 2014 08:43:26 -0400\r
38 Message-ID: <87siqsrhch.fsf@zancas.localnet>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Sat, 08 Mar 2014 12:43:40 -0000\r
54 \r
55 "W. Trevor King" <wking@tremily.us> writes:\r
56 \r
57 \r
58 > +sub do_clone {\r
59 > +  my $repository = shift;\r
60 > +  system ('git', 'clone', '--bare', $repository, $NMBGIT) == 0\r
61 > +    or die "'git clone' exited with nonzero value\n";\r
62 > +  my $branch = git ('symbolic-ref', 'HEAD');\r
63 > +  $branch =~ s|^refs/heads/||;\r
64 > +  git ('config', 'remote.origin.fetch', '+refs/heads/*:refs/remotes/origin/*');\r
65 > +  git ('config', "branch.$branch.remote", 'origin');\r
66 > +  git ('config', "branch.$branch.merge", 'refs/heads/$branch');\r
67 > +  do_fetch();\r
68 > +}\r
69 \r
70 I think doing a fetch immediately after a clone deserves a comment.\r
71 \r
72 >  \r
73 > @@ -473,7 +487,7 @@ sub diff_index {\r
74 >  sub diff_refs {\r
75 >    my $filter = shift;\r
76 >    my $ref1 = shift || 'HEAD';\r
77 > -  my $ref2 = shift || 'FETCH_HEAD';\r
78 > +  my $ref2 = shift || '@{upstream}';\r
79 \r
80 I wonder about hard-coding '@{upstream}' in several places. What do you\r
81 think about a global "constant"? OF course it was hard-coded FETCH_HEAD\r
82 before, but I think not in quite as many places.\r