[PATCH] new-workdir: Never try to recurse into submodules on the initial checkout.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux