git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] new-workdir: Never try to recurse into submodules on the initial checkout.
@ 2019-01-14 17:27 Marc Branchaud
  2019-01-14 21:34 ` Jonathan Nieder
  2019-01-15 15:07 ` [PATCHv2] " Marc Branchaud
  0 siblings, 2 replies; 8+ messages in thread
From: Marc Branchaud @ 2019-01-14 17:27 UTC (permalink / raw)
  To: git; +Cc: Duy Nguyen, Stefan Beller

The new workdir is empty before the checkout, so attempts to recurse into
a non-existent submodule directory fail.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
---

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
-- 
2.20.1.1.gfb6d716d28


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-01-15 18:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 17:27 [PATCH] new-workdir: Never try to recurse into submodules on the initial checkout Marc Branchaud
2019-01-14 21:34 ` Jonathan Nieder
2019-01-14 21:44   ` Junio C Hamano
2019-01-14 21:58     ` Jonathan Nieder
2019-01-15 15:02       ` Marc Branchaud
2019-01-15 18:38       ` Junio C Hamano
2019-01-15 15:01   ` Marc Branchaud
2019-01-15 15:07 ` [PATCHv2] " Marc Branchaud

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).