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"
|
||||
|
@ -31,4 +31,4 @@ incremental = true
|
|||
opt-level = 3
|
||||
strip = true
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
codegen-units = 1
|
|
@ -227,7 +227,12 @@ fn get_commits(
|
|||
let branch_names = &*branches[i];
|
||||
let mut branches = vec![];
|
||||
if branch_names.is_empty() {
|
||||
branches.extend(repo.branch_names().iter());
|
||||
if repo.branch_names().is_empty() {
|
||||
branches.extend(["@"]);
|
||||
}
|
||||
else {
|
||||
branches.extend(repo.branch_names().iter());
|
||||
}
|
||||
}
|
||||
else {
|
||||
let branch_names = branch_names.split(' ');
|
||||
|
|
Loading…
Reference in New Issue