From 6a0a8229953a786359f7284ce31b8684de3e89f9 Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Mon, 16 Jan 2023 23:15:35 +0100 Subject: [PATCH] chore: exclude merge commits in count commit script --- count-commits.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/count-commits.sh b/count-commits.sh index 949ec77..aa57575 100755 --- a/count-commits.sh +++ b/count-commits.sh @@ -1,6 +1,6 @@ #!/bin/bash -total_commits=$(git shortlog -s -n | awk '{ sum += $1; } END { print sum; }' "$@") +total_commits=$(git shortlog -s -n --no-merges | awk '{ sum += $1; } END { print sum; }' "$@") if [[ $total_commits -gt 200 ]]; then echo "Total commits: $total_commits (minimum required commits reached)" @@ -9,4 +9,4 @@ else fi echo "Commits per user:" -git shortlog -s -e | sed 's///' | awk '{ printf "\t%s (%s): %s\n", $2, $3, $1 }' +git shortlog -s -e --no-merges | sed 's///' | awk '{ printf "\t%s (%s): %s\n", $2, $3, $1 }'