Fixed a potential error due to local repos not having any branches
parent
9efedeba00
commit
cb50649d85
10
src/main.rs
10
src/main.rs
|
@ -243,8 +243,14 @@ fn get_commits(
|
||||||
let mut has_commits = false;
|
let mut has_commits = false;
|
||||||
|
|
||||||
for branch in branches {
|
for branch in branches {
|
||||||
let branch_commits = repo
|
// When passing the default @ (HEAD) branch this might actually not exist at all
|
||||||
.rev_parse(branch)?
|
// locally so we're skipping it
|
||||||
|
let Ok(rev) = repo.rev_parse(branch)
|
||||||
|
else {
|
||||||
|
continue;
|
||||||
|
};
|
||||||
|
|
||||||
|
let branch_commits = rev
|
||||||
.single()
|
.single()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.ancestors()
|
.ancestors()
|
||||||
|
|
Loading…
Reference in New Issue