git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3b3739
)
avoid drawing empty graph
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 5 Sep 2019 02:45:25 +0000
(
04:45
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 5 Sep 2019 03:11:33 +0000
(
05:11
+0200)
graph
patch
|
blob
|
history
diff --git
a/graph
b/graph
index 096586e9e04547e1c59d6db804f938a7e28124db..fc659e1ec79c06629daac5ca37e968c8c5f90741 100755
(executable)
--- a/
graph
+++ b/
graph
@@
-61,7
+61,7
@@
for my $nr (0 .. $#lines) {
print "\e[0m" if $color;
}
printf '%-*s', $len, $lines[$nr];
- print $barmark[$_] // '-' for 1 .. (($val || 0) - $minval) * $size;
+ print $barmark[$_] // '-' for 1 ..
$size &&
(($val || 0) - $minval) * $size;
say '';
}