Added more verbosity
This commit is contained in:
16
gitistics.sh
16
gitistics.sh
@@ -26,14 +26,22 @@ function getDiffChanges() {
|
||||
local __delete=$3
|
||||
|
||||
# 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 ,
|
||||
local IFS=','
|
||||
local array=( $extractdiff )
|
||||
local f=$(( ${array[0]//[!0-9]} + __files))
|
||||
local i=$(( ${array[1]//[!0-9]} + __insert))
|
||||
local d=$(( ${array[2]//[!0-9]} + __delete))
|
||||
|
||||
# Parse the numbers
|
||||
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 $__insert="'$i'"
|
||||
|
Reference in New Issue
Block a user