Skip to main content

submodule_update

Function submodule_update 

Source
pub fn submodule_update(
    repo_path: &Path,
    path: Option<&Path>,
    timeout: Duration,
) -> Result<(), String>
Expand description

Initialises and updates the submodule checked out at path (relative to the repository root), or every submodule when path is None, together with any submodules nested inside it: git submodule update --init --recursive. Each submodule’s configured update mode applies and nothing is forced, so local changes a checkout would overwrite fail the update instead of being lost. It may clone or fetch, so it is bounded by timeout (zero means no limit).