From patchwork Mon Jan 14 17:27:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Branchaud X-Patchwork-Id: 10763229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 816DF91E for ; Mon, 14 Jan 2019 17:34:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 680942907B for ; Mon, 14 Jan 2019 17:34:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58DDD29262; Mon, 14 Jan 2019 17:34:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3363B2907B for ; Mon, 14 Jan 2019 17:34:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfANReV (ORCPT ); Mon, 14 Jan 2019 12:34:21 -0500 Received: from [192.252.130.194] ([192.252.130.194]:46088 "EHLO cubert.xiplink.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726646AbfANReV (ORCPT ); Mon, 14 Jan 2019 12:34:21 -0500 X-Greylist: delayed 437 seconds by postgrey-1.27 at vger.kernel.org; Mon, 14 Jan 2019 12:34:20 EST Received: from xiplink.com (rincewind.xiplink.com [10.10.1.32]) by cubert.xiplink.com (Postfix) with ESMTP id C8135A1E8D; Mon, 14 Jan 2019 12:27:02 -0500 (EST) From: Marc Branchaud To: git@vger.kernel.org Cc: Duy Nguyen , Stefan Beller Subject: [PATCH] new-workdir: Never try to recurse into submodules on the initial checkout. Date: Mon, 14 Jan 2019 12:27:02 -0500 Message-Id: <20190114172702.19959-1-marcnarc@xiplink.com> X-Mailer: git-send-email 2.20.1.1.gfb6d716d28 MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The new workdir is empty before the checkout, so attempts to recurse into a non-existent submodule directory fail. Signed-off-by: Marc Branchaud --- Until the worktree command supports submodules I've gone back to using the git-new-workdir script, but it fails if my config has submdodule.recurse=true. With this patch, the checkout succeeds and the workdir has empty submodules, which is the script's normal behaviour. M. contrib/workdir/git-new-workdir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir index 888c34a521..5de1dc3c58 100755 --- a/contrib/workdir/git-new-workdir +++ b/contrib/workdir/git-new-workdir @@ -102,4 +102,4 @@ trap - $siglist # checkout the branch (either the same as HEAD from the original repository, # or the one that was asked for) -git checkout -f $branch +git -c submodule.recurse=false checkout -f $branch