Fixed repos without a remote having an empty branches list
parent
eaf956ef9f
commit
f8b8a69b8c
|
@ -426,7 +426,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "git-heatmap"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
|
|
@ -2,7 +2,7 @@ cargo-features = ["codegen-backend"]
|
|||
|
||||
[package]
|
||||
name = "git-heatmap"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
edition = "2021"
|
||||
authors = ["Wynd <wyndftw@proton.me>"]
|
||||
description = "A simple and customizable heatmap for git repos"
|
||||
|
|
|
@ -227,8 +227,13 @@ fn get_commits(
|
|||
let branch_names = &*branches[i];
|
||||
let mut branches = vec![];
|
||||
if branch_names.is_empty() {
|
||||
if repo.branch_names().is_empty() {
|
||||
branches.extend(["@"]);
|
||||
}
|
||||
else {
|
||||
branches.extend(repo.branch_names().iter());
|
||||
}
|
||||
}
|
||||
else {
|
||||
let branch_names = branch_names.split(' ');
|
||||
branches.extend(branch_names);
|
||||
|
|
Loading…
Reference in New Issue