You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
470 B

  1. #!/bin/bash
  2. total_commits=$(git shortlog -s -n --no-merges | awk '{ sum += $1; } END { print sum; }' "$@")
  3. if [[ $total_commits -gt 200 ]]; then
  4. echo "Total commits: $total_commits (minimum required commits reached)"
  5. else
  6. echo "Total commits: $total_commits ($(expr 200 - $total_commits) commits left to reach minimum required commits)"
  7. fi
  8. echo "Commits per user:"
  9. git shortlog -s -e --no-merges | sed 's/<//;s/>//' | awk '{ printf "\t%s (%s): %s\n", $2, $3, $1 }'