Total commit counter

This commit is contained in:
2019-01-05 00:28:57 +01:00
parent f6ee22af4c
commit 3ced822ba6

View File

@@ -7,13 +7,15 @@ REPODIR=~/Git
REPOUSER="\(structix\|Janek\)" REPOUSER="\(structix\|Janek\)"
# Specify the start date, where the statistics should be gathered # Specify the start date, where the statistics should be gathered
STARTDATE='01 Jan 2018' STARTDATE="01 Jan 2018"
# -------------------- # --------------------
# Switch into the REPODIR # Switch into the REPODIR
pushd $REPODIR pushd $REPODIR
commitcounter=0
# Iterate over all subdirectories # Iterate over all subdirectories
for dir in $REPODIR/*/ for dir in $REPODIR/*/
do do
@@ -24,13 +26,17 @@ do
cd ${dir##*/} cd ${dir##*/}
# show amount of commits of all users # show amount of commits of all users
git rev-list --count --all --author=$REPOUSER --since="01 Jan 2018" committemp=$(git rev-list --count --all --author=$REPOUSER --since="$STARTDATE")
commitcounter=$((commitcounter + committemp))
echo $committemp
# go back # go back
cd .. cd ..
done done
echo "Total commits since $STARTDATE: $commitcounter"
# Switch back to the original directory state # Switch back to the original directory state
popd popd