module documentation

Working with Git submodules.

Function ensure_submodule_placeholder Create a submodule placeholder directory with .git file.
Function iter_cached_submodules Iterate over cached submodules.
def ensure_submodule_placeholder(repo: Repo, submodule_path: str | bytes):

Create a submodule placeholder directory with .git file.

This creates the minimal structure needed for a submodule: - The submodule directory - A .git file pointing to the submodule's git directory

Parameters
repo:RepoParent repository
submodule_path:str | bytesPath to the submodule relative to repo root
def iter_cached_submodules(store: ObjectContainer, root_tree_id: ObjectID) -> Iterator[tuple[bytes, ObjectID]]:

Iterate over cached submodules.

Parameters
store:ObjectContainerObject store to iterate
root_tree_id:ObjectIDSHA of root tree
Returns
Iterator[tuple[bytes, ObjectID]]Iterator over over (path, sha) tuples