Added git repo size
This commit is contained in:
12
gitistics.sh
12
gitistics.sh
@@ -10,7 +10,7 @@ REPOUSER="\(structix\|Janek\)"
|
|||||||
STARTDATE="01 Jan 2018"
|
STARTDATE="01 Jan 2018"
|
||||||
|
|
||||||
# Verbose flag
|
# Verbose flag
|
||||||
VERBOSE=false
|
VERBOSE=true
|
||||||
|
|
||||||
# --------------------
|
# --------------------
|
||||||
# --- functions
|
# --- functions
|
||||||
@@ -54,6 +54,13 @@ function getDiffChanges() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# repository size (only show in verbose mode)
|
||||||
|
function getRepoSize() {
|
||||||
|
if [ "$VERBOSE" = true ]; then
|
||||||
|
git count-objects -H
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
# Switch into the REPODIR (silently)
|
# Switch into the REPODIR (silently)
|
||||||
pushd $REPODIR 1> /dev/null
|
pushd $REPODIR 1> /dev/null
|
||||||
@@ -82,6 +89,8 @@ function main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
getDiffChanges totalfiles totalinsertions totaldeletions
|
getDiffChanges totalfiles totalinsertions totaldeletions
|
||||||
|
|
||||||
|
getRepoSize
|
||||||
|
|
||||||
# go back
|
# go back
|
||||||
cd ..
|
cd ..
|
||||||
@@ -98,4 +107,5 @@ function main() {
|
|||||||
echo "Total deletions: $totaldeletions"
|
echo "Total deletions: $totaldeletions"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Start the main function
|
||||||
main
|
main
|
||||||
|
Reference in New Issue
Block a user