From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id DDD9D6DE0B78 for ; Tue, 10 Oct 2017 15:54:49 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: 0.096 X-Spam-Level: X-Spam-Status: No, score=0.096 tagged_above=-999 required=5 tests=[AWL=0.308, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.211, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HqBXQ7WmlY-1 for ; Tue, 10 Oct 2017 15:54:48 -0700 (PDT) Received: from resqmta-po-06v.sys.comcast.net (resqmta-po-06v.sys.comcast.net [96.114.154.165]) by arlo.cworth.org (Postfix) with ESMTPS id 90E716DE0C67 for ; Tue, 10 Oct 2017 15:54:48 -0700 (PDT) Received: from resomta-po-20v.sys.comcast.net ([96.114.154.244]) by resqmta-po-06v.sys.comcast.net with ESMTP id 23LVesj9hdLPQ23LfeH0AF; Tue, 10 Oct 2017 22:50:03 +0000 Received: from mail.tremily.us ([67.168.186.5]) by resomta-po-20v.sys.comcast.net with SMTP id 23JhezUkFOhsv23JheP18s; Tue, 10 Oct 2017 22:48:03 +0000 Received: from ullr.tremily.us (ullr.tremily.us [192.168.10.7]) by mail.tremily.us (Postfix) with SMTP id 29D2CF57AF2; Tue, 10 Oct 2017 15:48:26 -0700 (PDT) Received: (nullmailer pid 4992 invoked by uid 1000); Tue, 10 Oct 2017 22:49:55 -0000 From: "W. Trevor King" To: notmuch@notmuchmail.org Cc: Daniel Kahn Gillmor , David Bremner , "W. Trevor King" Subject: [PATCH 2/4] nmbug: Accept failures to unset core.worktree in clone Date: Tue, 10 Oct 2017 15:49:50 -0700 Message-Id: X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: X-CMAE-Envelope: MS4wfPeHqHtkWf4xbHC9x/St9+RkSpi4JLvaaH0PlNl6jxI7f2pPsKZnF8bhgKai4aw40OHeoOAxePXTTCo4xH5RCPBwAv4aOdujFrjcEKUJuF6nUtnwSEN/ FjgmJFHIpDP0jbBS1J61I/1vj08xn7C3imXU+bv3xb1rRzhZbgJIdQE55UTgvMpQA4IUQnm/yNr4ddS+HetUomoAxLXWxFS2PHCgdjCuRdGyXGFNJ5D//ow8 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Tue, 10 Oct 2017 22:54:50 -0000 Since 6311cfaf (init: do not set unnecessary core.worktree, 2016-09-25, 2.11.0 [1]), Git has no longer set core.worktree when --separate-git-dir is used. This broke clone with: $ nmbug clone http://nmbug.notmuchmail.org/git/nmbug-tags.git Cloning into '/tmp/nmbug-clone.33gg442e'... Checking connectivity: 16674, done. ['git', '--git-dir', '/home/wking/.nmbug', 'config', '--unset', 'core.worktree'] exited with 5 $ echo $? 1 The initial discussion that lead to the Git change is in [2], and there is some more discussion around this specific change in [3]. There is some useful background on working trees in this 2009 message [4]. There is also a git-worktree(1) since df0b6cfb (worktree: new place for "git prune --worktrees", 2015-06-29, 2.5.0 [5]) which grew the ability to add new worktrees in 799767cc (Merge branch 'es/worktree-add', 2015-07-13, 2.5.0 [6]). Folks relying on core.worktree in the --separate-git-dir case fall into the "former case" in [4], and as Junio pointed out in that message, Git operations like 'add' don't really work there. In nmbug we don't want core.worktree, because our effective working tree is the notmuch database. By accepting failed core.worktree unsets, clone will work with Gits older and younger than 2.11.0. [1]: https://github.com/git/git/commit/6311cfaf93716bcc43dd1151cb1763e3f80d8099 [2]: https://public-inbox.org/git/CALqjkKZO_y0DNcRJjooyZ7Eso7yBMGhvZ6fE92oO4Su7JeCeng@mail.gmail.com/ [3]: https://public-inbox.org/git/87h94d8cwi.fsf@kyleam.com/ [4]: https://public-inbox.org/git/7viqbsw2vn.fsf@alter.siamese.dyndns.org/ [5]: https://github.com/git/git/commit/df0b6cfbda88144714541664fb501146d6465a82 [6]: https://github.com/git/git/commit/799767cc98b2f8e6f82d0de4bef9b5e8fcc16e97 Reported-by: Daniel Kahn Gillmor --- devel/nmbug/nmbug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug index 755bd7db..c0e7c3c6 100755 --- a/devel/nmbug/nmbug +++ b/devel/nmbug/nmbug @@ -308,7 +308,7 @@ def clone(repository): 'git', 'clone', '--no-checkout', '--separate-git-dir', NMBGIT, repository, workdir], wait=True) - _git(args=['config', '--unset', 'core.worktree'], wait=True) + _git(args=['config', '--unset', 'core.worktree'], wait=True, expect=(0, 5)) _git(args=['config', 'core.bare', 'true'], wait=True) _git(args=['branch', 'config', 'origin/config'], wait=True) -- 2.13.6