Added git repo size

This commit is contained in:
2019-01-05 17:59:31 +01:00
parent 22d0261df9
commit d8ea6be7f2

View File

@@ -10,7 +10,7 @@ REPOUSER="\(structix\|Janek\)"
STARTDATE="01 Jan 2018"
# Verbose flag
VERBOSE=false
VERBOSE=true
# --------------------
# --- 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() {
# Switch into the REPODIR (silently)
pushd $REPODIR 1> /dev/null
@@ -82,6 +89,8 @@ function main() {
fi
getDiffChanges totalfiles totalinsertions totaldeletions
getRepoSize
# go back
cd ..
@@ -98,4 +107,5 @@ function main() {
echo "Total deletions: $totaldeletions"
}
# Start the main function
main