Skip to main content

git_clone_or_update

Function git_clone_or_update 

Source
pub fn git_clone_or_update(
    install_dir: &str,
    repo_url: &str,
    dry_run: bool,
) -> Result<(), String>
Expand description

Clone a git repository or update it if it already exists.

If the directory exists and contains a .git folder, performs a fetch and hard reset. Otherwise, clones the repository.

Supports dry-run mode — logs commands without executing.