diff --git a/Cargo.lock b/Cargo.lock index 8cea0f1..15124f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,7 +426,7 @@ dependencies = [ [[package]] name = "git-heatmap" -version = "1.0.1" +version = "1.0.2" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 9fb8bb4..d4dbc75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ cargo-features = ["codegen-backend"] [package] name = "git-heatmap" -version = "1.0.1" +version = "1.0.2" edition = "2021" authors = ["Wynd "] 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 \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 70a7786..c0f3862 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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(' ');