From a4963908842d939b904d0c56329c4ec92d3efe4f Mon Sep 17 00:00:00 2001 From: Robert Beilich Date: Tue, 17 Jul 2018 09:36:12 +0200 Subject: [PATCH] Fix error on whitespace in author name Fixes https://github.com/arzzen/git-quick-stats/issues/37 --- git-quick-stats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-quick-stats b/git-quick-stats index 7289828..c0c2b2f 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -204,7 +204,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' $_author $_since $_until | grep " $i:" | wc -l) + echo $(git shortlog -n --no-merges --format='%ad %s' "$_author" $_since $_until | grep " $i:" | wc -l) done | awk '{ count[$1] = $2 total += $2 @@ -277,10 +277,10 @@ function changelogs() { fi NEXT=$(date +%F) - git log --use-mailmap --no-merges --format="%cd" --date=short $_author $_since $_until $_pathspec | sort -u -r | head -n $_limit | while read DATE ; do + git log --use-mailmap --no-merges --format="%cd" --date=short "$_author" $_since $_until $_pathspec | sort -u -r | head -n $_limit | while read DATE ; do echo echo "[$DATE]" - GIT_PAGER=cat git log --use-mailmap --no-merges --format=" * %s (%aN)" $_author --since=$DATE --until=$NEXT + GIT_PAGER=cat git log --use-mailmap --no-merges --format=" * %s (%aN)" "$_author" --since=$DATE --until=$NEXT NEXT=$DATE done }