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" 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
@@ -83,6 +90,8 @@ function main() {
getDiffChanges totalfiles totalinsertions totaldeletions getDiffChanges totalfiles totalinsertions totaldeletions
getRepoSize
# go back # go back
cd .. cd ..
done done
@@ -98,4 +107,5 @@ function main() {
echo "Total deletions: $totaldeletions" echo "Total deletions: $totaldeletions"
} }
# Start the main function
main main