@@ -27,6 +27,7 @@ async def ingest_async(
2727 branch : str | None = None ,
2828 tag : str | None = None ,
2929 include_gitignored : bool = False ,
30+ include_submodules : bool = False ,
3031 token : str | None = None ,
3132 output : str | None = None ,
3233) -> tuple [str , str , str ]:
@@ -52,6 +53,8 @@ async def ingest_async(
5253 The tag to clone and ingest. If ``None``, no tag is used.
5354 include_gitignored : bool
5455 If ``True``, include files ignored by ``.gitignore`` and ``.gitingestignore`` (default: ``False``).
56+ include_submodules : bool
57+ If ``True``, recursively include all Git submodules within the repository (default: ``False``).
5558 token : str | None
5659 GitHub personal access token (PAT) for accessing private repositories.
5760 Can also be set via the ``GITHUB_TOKEN`` environment variable.
@@ -86,6 +89,8 @@ async def ingest_async(
8689 if query .url :
8790 _override_branch_and_tag (query , branch = branch , tag = tag )
8891
92+ query .include_submodules = include_submodules
93+
8994 async with _clone_repo_if_remote (query , token = token ):
9095 summary , tree , content = ingest_query (query )
9196 await _write_output (tree , content = content , target = output )
@@ -101,6 +106,7 @@ def ingest(
101106 branch : str | None = None ,
102107 tag : str | None = None ,
103108 include_gitignored : bool = False ,
109+ include_submodules : bool = False ,
104110 token : str | None = None ,
105111 output : str | None = None ,
106112) -> tuple [str , str , str ]:
@@ -126,6 +132,8 @@ def ingest(
126132 The tag to clone and ingest. If ``None``, no tag is used.
127133 include_gitignored : bool
128134 If ``True``, include files ignored by ``.gitignore`` and ``.gitingestignore`` (default: ``False``).
135+ include_submodules : bool
136+ If ``True``, recursively include all Git submodules within the repository (default: ``False``).
129137 token : str | None
130138 GitHub personal access token (PAT) for accessing private repositories.
131139 Can also be set via the ``GITHUB_TOKEN`` environment variable.
@@ -156,6 +164,7 @@ def ingest(
156164 branch = branch ,
157165 tag = tag ,
158166 include_gitignored = include_gitignored ,
167+ include_submodules = include_submodules ,
159168 token = token ,
160169 output = output ,
161170 ),
0 commit comments