Compare commits
2 Commits
f8b8a69b8c
...
cb50649d85
Author | SHA1 | Date |
---|---|---|
Wynd | cb50649d85 | |
Wynd | 9efedeba00 |
|
@ -426,7 +426,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "git-heatmap"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
|
|
@ -2,7 +2,7 @@ cargo-features = ["codegen-backend"]
|
|||
|
||||
[package]
|
||||
name = "git-heatmap"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
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
|
||||
|
|
|
@ -23,7 +23,7 @@ pub struct CliArgs {
|
|||
#[arg(short, long, num_args(0..), value_hint = ValueHint::DirPath)]
|
||||
pub repos: Option<Vec<PathBuf>>,
|
||||
|
||||
#[arg(short('i'), long("igore"), num_args(0..))]
|
||||
#[arg(short('i'), long("ignore"), num_args(0..))]
|
||||
pub ignored_repos: Option<Vec<String>>,
|
||||
|
||||
#[arg(short, long, num_args(0..))]
|
||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -243,8 +243,14 @@ fn get_commits(
|
|||
let mut has_commits = false;
|
||||
|
||||
for branch in branches {
|
||||
let branch_commits = repo
|
||||
.rev_parse(branch)?
|
||||
// When passing the default @ (HEAD) branch this might actually not exist at all
|
||||
// locally so we're skipping it
|
||||
let Ok(rev) = repo.rev_parse(branch)
|
||||
else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let branch_commits = rev
|
||||
.single()
|
||||
.unwrap()
|
||||
.ancestors()
|
||||
|
|
Loading…
Reference in New Issue