diff --git a/src/main.rs b/src/main.rs index 1c43943..05396fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -257,15 +257,13 @@ fn get_commits( branches.extend(branch_names); } - branches_count += branches.len(); - let mailmap = Mailmap::new(repo_path); let mut has_commits = false; - for branch in branches { + for branch in &branches { // When passing the default @ (HEAD) branch this might actually not exist at all // locally so we're skipping it - let Ok(rev) = repo.rev_parse(&*branch) + let Ok(rev) = repo.rev_parse(&**branch) else { continue; }; @@ -334,6 +332,7 @@ fn get_commits( if has_commits { repos_count += 1; + branches_count += branches.len(); } }