Total commit counter
This commit is contained in:
10
gitistics.sh
10
gitistics.sh
@@ -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
|
||||
|
Reference in New Issue
Block a user