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"
|
||||
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user