summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Hall <Hallzy.18@gmail.com>2017-03-07 22:34:20 -0800
committerSteven Hall <Hallzy.18@gmail.com>2017-03-07 22:36:45 -0800
commitb63fbc85fda00873e5e6984de53971c0d229660b (patch)
tree21302b0a5d0ecc4005cca702a6a35acbad261ea6
parent2ac25e3d1047cdf19f15bc894ff39449b83d65d4 (diff)
downloadgit-sonar-b63fbc85fda00873e5e6984de53971c0d229660b.tar.gz
git-sonar-b63fbc85fda00873e5e6984de53971c0d229660b.zip
Added TC for typechanged status
-rwxr-xr-xradar-base.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 61503fd..25a72b2 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -337,6 +337,7 @@ staged_status() {
local filesDeleted="$(printf '%s' "$gitStatus" | grep -oE "D[AMCR ] " | wc -l | grep -oEi '[1-9][0-9]*')"
local filesRenamed="$(printf '%s' "$gitStatus" | grep -oE "R[AMCD ] " | wc -l | grep -oEi '[1-9][0-9]*')"
local filesCopied="$(printf '%s' "$gitStatus" | grep -oE "C[AMDR ] " | wc -l | grep -oEi '[1-9][0-9]*')"
+ local typeChanged="$(printf '%s' "$gitStatus" | grep -oE "T[AMDR ] " | wc -l | grep -oEi '[1-9][0-9]*')"
if [ -n "$filesAdded" ]; then
staged_string="$staged_string$filesAdded${prefix}A${suffix}"
@@ -353,6 +354,9 @@ staged_status() {
if [ -n "$filesCopied" ]; then
staged_string="$staged_string$filesCopied${prefix}C${suffix}"
fi
+ if [ -n "$typeChanged" ]; then
+ staged_string="$staged_string$typeChanged${prefix}TC${suffix}"
+ fi
printf '%s' "$staged_string"
}
@@ -386,6 +390,7 @@ unstaged_status() {
local filesModified="$(printf '%s' "$gitStatus" | grep -oE "[ACDRM ]M " | wc -l | grep -oEi '[1-9][0-9]*')"
local filesDeleted="$(printf '%s' "$gitStatus" | grep -oE "[AMCR ]D " | wc -l | grep -oEi '[1-9][0-9]*')"
+ local typeChanged="$(printf '%s' "$gitStatus" | grep -oE "[AMDR ]T " | wc -l | grep -oEi '[1-9][0-9]*')"
if [ -n "$filesDeleted" ]; then
unstaged_string="$unstaged_string$filesDeleted${prefix}D${suffix}"
@@ -393,6 +398,9 @@ unstaged_status() {
if [ -n "$filesModified" ]; then
unstaged_string="$unstaged_string$filesModified${prefix}M${suffix}"
fi
+ if [ -n "$typeChanged" ]; then
+ unstaged_string="$unstaged_string$typeChanged${prefix}TC${suffix}"
+ fi
printf '%s' "$unstaged_string"
}