From 29bbc98c879af414a4eda701fb23ed93e18bf745 Mon Sep 17 00:00:00 2001 From: Lukas Mestan Date: Wed, 15 Mar 2017 20:11:56 +0100 Subject: [PATCH] rename _GIT_EXCLUDE to _GIT_PATHSPEC --- git-quick-stats | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/git-quick-stats b/git-quick-stats index d0ca0eb..af85016 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -13,7 +13,7 @@ if [ ! -z ${_until} ] then _until="--until=$_until" fi -_exclude=${_GIT_EXCLUDE:-} +_exclude=${_GIT_PATHSPEC:-} if [ ! -z "${_exclude}" ] then _exclude="-- . $_exclude" fi @@ -86,6 +86,7 @@ function detailedGitStats() { } if ( first[author] != "" ) { + printf "\t lines changed: %s\n", more[author] + less[author] printf "\t first commit: %s\n", first[author] printf "\t last commit: %s\n", last[author] } @@ -142,7 +143,7 @@ function commitsByMonth() { for i in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec do echo -en "\t$i\t" - echo $(git shortlog -n --no-merges --format='%ad %s' $_since $_until $_exclude | grep " $i " | wc -l) + echo $(git shortlog -n --no-merges --format='%ad %s' $_since $_until | grep " $i " | wc -l) done | awk '{ count[$1] = $2 total += $2 @@ -166,7 +167,7 @@ function commitsByWeekday() { for i in Mon Tue Wed Thu Fri Sat Sun do echo -en "\t$i\t" - echo $(git shortlog -n --no-merges --format='%ad %s' $_since $_until $_exclude | grep "$i " | wc -l) + echo $(git shortlog -n --no-merges --format='%ad %s' $_since $_until | grep "$i " | wc -l) done | awk '{ } @@ -194,7 +195,7 @@ function commitsByHour() { for i in `seq -w 0 23` do echo -ne "\t$i\t" - echo $(git shortlog -n --no-merges --format='%ad %s' $_since $_until $_exclude | grep " $i:" | wc -l) + echo $(git shortlog -n --no-merges --format='%ad %s' $_since $_until | grep " $i:" | wc -l) done | awk '{ count[$1] = $2 total += $2