Fixed a stupid bug with by-amount and made by-weight the default
parent
f2e52f3815
commit
90bd9ac376
|
@ -45,10 +45,10 @@ $ git-heatmap -r "/path/to/repo" -b "main" -r "other/repo" -b ""
|
|||
# by default merges are counted so using --no-merges ensures they won't be counted
|
||||
$ git-heatmap --no-merges
|
||||
|
||||
# by default it colors every day on a per number of commits basis with --counting by-weight
|
||||
# it will color the days based on the number of commits in that day vs
|
||||
# the maximum number of commits in a day that is visible
|
||||
$ git-heatmap --counting by-weight
|
||||
# by default it colors every day based on which one the maximum number of commits in a visible day
|
||||
# shading all the others accordingly, with by-amount it will instead color each day based on
|
||||
# the amount of commits in that day
|
||||
$ git-heatmap --counting by-amount
|
||||
|
||||
# filter by one or multiple authors
|
||||
# without an -a flag all authors will be checked
|
||||
|
|
|
@ -32,11 +32,11 @@ pub struct CliArgs {
|
|||
#[arg(long("no-merges"), default_value_t = false)]
|
||||
pub no_merges: bool,
|
||||
|
||||
#[arg(long("counting"), value_enum, default_value_t = ColorLogic::ByAmount)]
|
||||
#[arg(long("counting"), value_enum, default_value_t = ColorLogic::ByWeight)]
|
||||
pub counting: ColorLogic,
|
||||
}
|
||||
|
||||
fn get_since_date() -> String {
|
||||
let date = Local::now() - Duration::days(365);
|
||||
date.format("%Y-%m-%d").to_string()
|
||||
}
|
||||
}
|
|
@ -109,7 +109,7 @@ fn get_color(val: i32, high: i32) -> usize {
|
|||
x if x < 2 => 1,
|
||||
x if x < 4 => 2,
|
||||
x if x < 6 => 3,
|
||||
x if x > 6 => 4,
|
||||
x if x >= 6 => 4,
|
||||
_ => 0,
|
||||
},
|
||||
ColorLogic::ByWeight => {
|
||||
|
|
Loading…
Reference in New Issue