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