From bf29c19cf5638edb7dd408b2e235a2e6e928ca76 Mon Sep 17 00:00:00 2001 From: Pawaer Date: Sat, 24 Apr 2021 21:46:34 +0200 Subject: [PATCH] Replaced grep commit by grep with regex including git sha hash myDailyStats() used grep commit to detect count of commits. This also increases the count by mentioning commit in the commit message. Therefore a grep with regex is used that expects a 40 digit/char SHA1 hash after the word commit. --- git-quick-stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-quick-stats b/git-quick-stats index 763b900..f7ec390 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -546,7 +546,7 @@ function myDailyStats() { --author="$(git config user.name)" $_merges \ --since=$(date "+%Y-%m-%dT00:00:00") \ --until=$(date "+%Y-%m-%dT23:59:59") --reverse $_log_options \ - | grep commit | wc -l) "commits" + | grep -E "commit [a-f0-9]{40}" | wc -l) "commits" } ################################################################################