git.shiar.nl
/
barcat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
indicate limited results in stats
[barcat.git]
/
barcat
diff --git
a/barcat
b/barcat
index 2c1104871194a4ae25395113c6a215599ddcf112..c9b36cacfd853edf56dbae87ef11fc98735fb0e7 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-171,6
+171,11
@@
while ($nr <= $#lines) {
show_lines();
if ($opt{stat}) {
show_lines();
if ($opt{stat}) {
+ if ($opt{hidemin} or $opt{hidemax}) {
+ $opt{hidemin} ||= 1;
+ $opt{hidemax} ||= @lines;
+ printf '%s of ', sum(@values[$opt{hidemin} - 1 .. $opt{hidemax} - 1]) // 0;
+ }
my $total = sum @order;
printf '%s total', $total;
printf ' in %d values', scalar @values;
my $total = sum @order;
printf '%s total', $total;
printf ' in %d values', scalar @values;