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