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\)"
# Specify the start date, where the statistics should be gathered
STARTDATE='01 Jan 2018'
STARTDATE="01 Jan 2018"
# --------------------
# Switch into the REPODIR
pushd $REPODIR
commitcounter=0
# Iterate over all subdirectories
for dir in $REPODIR/*/
do
@@ -24,13 +26,17 @@ do
cd ${dir##*/}
# 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
cd ..
done
echo "Total commits since $STARTDATE: $commitcounter"
# Switch back to the original directory state
popd