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
|
# by default merges are counted so using --no-merges ensures they won't be counted
|
||||||
$ git-heatmap --no-merges
|
$ git-heatmap --no-merges
|
||||||
|
|
||||||
# by default it colors every day on a per number of commits basis with --counting by-weight
|
# by default it colors every day based on which one the maximum number of commits in a visible day
|
||||||
# it will color the days based on the number of commits in that day vs
|
# shading all the others accordingly, with by-amount it will instead color each day based on
|
||||||
# the maximum number of commits in a day that is visible
|
# the amount of commits in that day
|
||||||
$ git-heatmap --counting by-weight
|
$ git-heatmap --counting by-amount
|
||||||
|
|
||||||
# filter by one or multiple authors
|
# filter by one or multiple authors
|
||||||
# without an -a flag all authors will be checked
|
# without an -a flag all authors will be checked
|
||||||
|
|
|
@ -32,7 +32,7 @@ pub struct CliArgs {
|
||||||
#[arg(long("no-merges"), default_value_t = false)]
|
#[arg(long("no-merges"), default_value_t = false)]
|
||||||
pub no_merges: bool,
|
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,
|
pub counting: ColorLogic,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ fn get_color(val: i32, high: i32) -> usize {
|
||||||
x if x < 2 => 1,
|
x if x < 2 => 1,
|
||||||
x if x < 4 => 2,
|
x if x < 4 => 2,
|
||||||
x if x < 6 => 3,
|
x if x < 6 => 3,
|
||||||
x if x > 6 => 4,
|
x if x >= 6 => 4,
|
||||||
_ => 0,
|
_ => 0,
|
||||||
},
|
},
|
||||||
ColorLogic::ByWeight => {
|
ColorLogic::ByWeight => {
|
||||||
|
|
Loading…
Reference in New Issue