diff --git a/src/cli.rs b/src/cli.rs index cb46b8c..02e8415 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -9,7 +9,7 @@ use crate::heatmap::{ColorLogic, Format, HeatmapColors}; #[command(version, about, author, long_about = None, args_override_self = true)] pub struct CliArgs { #[arg(long("root-dir"), value_hint = ValueHint::DirPath)] - pub root_dir: Option, + pub root_dir: Option>, #[arg(short, long, num_args(0..))] pub authors: Option>, diff --git a/src/main.rs b/src/main.rs index 05396fe..0b4cce4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -196,9 +196,11 @@ fn get_commits( let ignored_repos = args.ignored_repos.as_ref().unwrap_or(&vec![]).to_owned(); let (repos, branches) = match &args.root_dir { - Some(root) => { + Some(roots) => { let mut repos: Vec = vec![]; - find_git_repos(root, &mut repos, &ignored_repos, &args); + for root in roots { + find_git_repos(root, &mut repos, &ignored_repos, &args); + } let branches = vec!["".to_string(); repos.len()]; (repos, branches) }