use std::path::PathBuf;
use clap::Parser;
mod dump_git;
mod git_parsing;
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Cli {
#[arg()]
url: String,
#[arg(default_value = "git-dumped")]
path: PathBuf,
#[arg(short, long, default_value_t = 8)]
tasks: u16,
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Cli::parse();
std::fs::create_dir_all(args.path.join(".git"))?;
dump_git::download_all(args.url.clone(), args.path, args.tasks).await;
Ok(())
}