Compare commits

..

4 Commits

Author SHA1 Message Date
arzzen
125eec7136 Merge pull request #195 from tomice/issues/194-flatten-awk-arrays-for-bsd-awk-compat
Flatten arrays for wider awk compatibility
2025-09-02 11:46:39 +02:00
Tom Ice
d61c812247 Flatten arrays for wider awk compatibility
* The current implementation of the calendar heatmap by author
  contains multidimensional arrays. This works with newer versions
  of awk, but can cause issues with systems that use an older variant
  which cannot easily handle these calculations. macOS is especially
  impacted by this.

  By flattening the arrays from a multidimensional array to a single
  dimensional array, we can maintain greater compatibility across awk
  variants without requiring the user to install additional versions
  of awk.

Addresses issue #194
2025-08-31 16:22:59 -04:00
arzzen
261262ab4e Update Dockerfile - add coreutils 2025-08-03 18:48:37 +02:00
arzzen
e968ef62b9 Merge pull request #190 from git-quick-stats/task/commits-heatmap
commits heatmap
2025-06-29 08:57:05 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ FROM alpine
COPY . /app
# Install required packages & build git-quick-stats
RUN apk add --no-cache bash git make ncurses util-linux \
RUN apk add --no-cache bash git make ncurses coreutils util-linux \
&& cd /app \
&& make install \
&& rm -rf /app \

View File

@@ -138,7 +138,7 @@ function commitsCalendarByAuthor() {
cmd | getline weekday;
close(cmd);
# weekday: 1=Mon, ..., 7=Sun
count[weekday][mon]++;
count[weekday * 12 + mon]++;
}
END {
# Output matrix
@@ -151,7 +151,7 @@ function commitsCalendarByAuthor() {
else if (d==6) printf "Sat ";
else if (d==7) printf "Sun ";
for (m=1; m<=12; m++) {
c = count[d][m]+0;
c = count[d * 12 + m]+0;
if (c==0)
out="...";
else if (c<=9)