Expand description
Parallel cloning operations.
This module provides functionality for cloning repositories, including parallel cloning with controlled concurrency.
§Example
use git_same::operations::clone::{CloneManager, CloneManagerOptions, NoProgress};
use git_same::git::ShellGit;
use std::path::Path;
let git = ShellGit::new();
let options = CloneManagerOptions::new()
.with_concurrency(4)
.with_structure("{org}/{repo}");
let manager = CloneManager::new(git, options);
// repos would come from discovery
let repos = vec![];
let progress = NoProgress;
let (summary, results) = manager
.clone_repos(Path::new("~/github"), repos, "github", std::sync::Arc::new(progress))
.await;
println!("Cloned {} repos, {} failed", summary.success, summary.failed);Structs§
- Clone
Manager - Manages parallel clone operations.
- Clone
Manager Options - Options for the clone manager.
- Clone
Result - Result of a single clone operation.
- NoProgress
- A no-op progress implementation for when no progress reporting is needed.
Constants§
- DEFAULT_
CONCURRENCY - Default concurrency when not specified in config.
- MAX_
CONCURRENCY - Maximum allowed concurrency to prevent resource exhaustion. Higher values can cause “too many open files” errors and network saturation.
- MIN_
CONCURRENCY - Minimum concurrency (at least one clone at a time).
Traits§
- Clone
Progress - Progress callback for clone operations.