From 192e0efcce132caebb1c764f522f3bfed0621727 Mon Sep 17 00:00:00 2001
From: Hatem Azzouni <44346143+7atech@users.noreply.github.com>
Date: Thu, 5 Dec 2024 19:00:46 +0100
Subject: [PATCH] Update sparse_clone.sh to support git submodules

check issue #165
---
 mkdocs_multirepo_plugin/scripts/sparse_clone.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mkdocs_multirepo_plugin/scripts/sparse_clone.sh b/mkdocs_multirepo_plugin/scripts/sparse_clone.sh
index fb22268..e6fa790 100755
--- a/mkdocs_multirepo_plugin/scripts/sparse_clone.sh
+++ b/mkdocs_multirepo_plugin/scripts/sparse_clone.sh
@@ -23,5 +23,7 @@ fi
 
 git clone --branch "$branch" --depth 1 --filter=blob:none --sparse $url_to_use "$name" || exit 1
 cd "$name"
+git submodule init
+git submodule update
 git sparse-checkout set --no-cone ${dirs[*]}
 rm -rf .git