From 6cdca7c7c7f9d9c701be759bdd30fc193de4fc16 Mon Sep 17 00:00:00 2001 From: Cameron Rodriguez Date: Tue, 4 Apr 2023 16:31:19 -0400 Subject: [PATCH] Sort, use more stable formatting for commits by timezone Switch to `git log` for formatting commits sorted by timezone, to avoid odd formatting cases. Also sorts timezones from negative to positive. --- git-quick-stats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-quick-stats b/git-quick-stats index 1ea4419..94d8727 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -874,9 +874,9 @@ function commitsByTimezone() { fi echo -e "Commits\tTimeZone" - git -c log.showSignature=false shortlog -n $_merges --format='%ad %s' \ + git -c log.showSignature=false log $_merges --format='%ad %s' \ "${_author}" "$_since" "$_until" --date=iso $_log_options $_pathspec \ - | cut -d " " -f 12 | grep -v -e '^[[:space:]]*$' | sort | uniq -c + | cut -d " " -f 3 | grep -v -e '^[[:space:]]*$' | sort -n | uniq -c } ################################################################################