From 956a8a646dcd9d244356c7f7c7de1185c4e8f8b8 Mon Sep 17 00:00:00 2001 From: Juliano Pezzini Date: Wed, 5 Feb 2020 09:26:38 -0300 Subject: [PATCH] New parameter --since go apply on git log command With this new parameter will be possible to filter since which date the heatmap will be analysed. --- git-heatmap | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/git-heatmap b/git-heatmap index daf6b35..f40261f 100755 --- a/git-heatmap +++ b/git-heatmap @@ -36,6 +36,11 @@ while [[ $# -gt 0 ]]; do shift shift ;; + -s|--since) + SINCE="$2" + shift + shift + ;; -h) cat <, --char Use to draw the bars. [default: █] -f , --filter Filter output through before creating the the histogram. + -s , --since Filter git log since . [default: always] -h Show this message. EOF exit @@ -67,10 +73,11 @@ REVIEW_BASE=${REVIEW_BASE:-master} CHAR=${CHAR:-█} WIDTH=${WIDTH:-60} FILTER=${FILTER:-cat -} +SINCE=${SINCE:-0001-01-01} files() { # https://stackoverflow.com/questions/7577052/ - git log --name-status --pretty=format: -- "${ARGV[@]+"${ARGV[@]}"}" | \ + git log --since="$SINCE" --name-status --pretty=format: -- "${ARGV[@]+"${ARGV[@]}"}" | \ cut -f 2- }