Added more verbosity

This commit is contained in:
2019-01-05 01:57:42 +01:00
parent 89306e57f6
commit 1008cee7e0

View File

@@ -26,14 +26,22 @@ function getDiffChanges() {
local __delete=$3 local __delete=$3
# calculate total changes between given date and HEAD # calculate total changes between given date and HEAD
local extractdiff=$(git diff @{"$STARTDATE"} HEAD --shortstat) 2>/dev/null local extractdiff=$(git diff @{"$STARTDATE"} HEAD --shortstat 2>/dev/null)
# set the separator to , # set the separator to ,
local IFS=',' local IFS=','
local array=( $extractdiff ) local array=( $extractdiff )
local f=$(( ${array[0]//[!0-9]} + __files))
local i=$(( ${array[1]//[!0-9]} + __insert)) # Parse the numbers
local d=$(( ${array[2]//[!0-9]} + __delete)) local extf=${array[0]//[!0-9]}
local exti=${array[1]//[!0-9]}
local extd=${array[2]//[!0-9]}
echo "Files: $extf, Insertions: $exti, Deletions: $extd"
local f=$(( extf + __files))
local i=$(( exti + __insert))
local d=$(( extd + __delete))
eval $__files="'$f'" eval $__files="'$f'"
eval $__insert="'$i'" eval $__insert="'$i'"