@@ -176,6 +176,7 @@ async def test_clone_repo_with_custom_branch() -> None:
176176 mock_exec .assert_called_once_with (
177177 "git" ,
178178 "clone" ,
179+ "--recurse-submodules" ,
179180 "--depth=1" ,
180181 "--single-branch" ,
181182 "--branch" ,
@@ -223,7 +224,13 @@ async def test_clone_repo_default_shallow_clone() -> None:
223224 await clone_repo (clone_config )
224225
225226 mock_exec .assert_called_once_with (
226- "git" , "clone" , "--depth=1" , "--single-branch" , clone_config .url , clone_config .local_path
227+ "git" ,
228+ "clone" ,
229+ "--recurse-submodules" ,
230+ "--depth=1" ,
231+ "--single-branch" ,
232+ clone_config .url ,
233+ clone_config .local_path ,
227234 )
228235
229236
@@ -246,7 +253,9 @@ async def test_clone_repo_commit_without_branch() -> None:
246253 await clone_repo (clone_config )
247254
248255 assert mock_exec .call_count == 2 # Clone and checkout calls
249- mock_exec .assert_any_call ("git" , "clone" , "--single-branch" , clone_config .url , clone_config .local_path )
256+ mock_exec .assert_any_call (
257+ "git" , "clone" , "--recurse-submodules" , "--single-branch" , clone_config .url , clone_config .local_path
258+ )
250259 mock_exec .assert_any_call ("git" , "-C" , clone_config .local_path , "checkout" , clone_config .commit )
251260
252261
@@ -356,6 +365,7 @@ async def test_clone_branch_with_slashes(tmp_path):
356365 mock_exec .assert_called_once_with (
357366 "git" ,
358367 "clone" ,
368+ "--recurse-submodules" ,
359369 "--depth=1" ,
360370 "--single-branch" ,
361371 "--branch" ,
@@ -391,6 +401,7 @@ async def test_clone_repo_creates_parent_directory(tmp_path: Path) -> None:
391401 mock_exec .assert_called_once_with (
392402 "git" ,
393403 "clone" ,
404+ "--recurse-submodules" ,
394405 "--depth=1" ,
395406 "--single-branch" ,
396407 clone_config .url ,
0 commit comments