From 72a95ecfcaddf6538db4742ede0dd575e2cd88e6 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 18 Jul 2021 02:46:36 +0100 Subject: [PATCH] Fix error with submodule cloning Call `git submodule update --init` manually rather than using GitPython's submodule API, as that fails with the following repo as a submodule: https://files.creativekara.fr/git/naturalslopeslib.git --- app/utils/git.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/utils/git.py b/app/utils/git.py index 9ca8290..327d933 100644 --- a/app/utils/git.py +++ b/app/utils/git.py @@ -60,9 +60,7 @@ def clone_repo(urlstr, ref=None, recursive=False): origin.fetch() repo.git.checkout(ref) - if recursive: - for submodule in repo.submodules: - submodule.update(init=True) + repo.git.submodule('update', '--init') yield repo shutil.rmtree(gitDir)