Branches will only count up if there's at least 1 commit visible from them, similiar to how repo or commits counters work
parent
50b3f95b1d
commit
de2b6190d5
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue