From d8ea6be7f2639ddf3272f5b8f8f50533954df704 Mon Sep 17 00:00:00 2001 From: structix Date: Sat, 5 Jan 2019 17:59:31 +0100 Subject: [PATCH] Added git repo size --- gitistics.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gitistics.sh b/gitistics.sh index ec6ba64..261334d 100755 --- a/gitistics.sh +++ b/gitistics.sh @@ -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