summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-05 12:31:51 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-05 12:31:51 +0300
commitc66d05ce1519db73520236370d1fec1d4f3af238 (patch)
treea2686a629bffbc6fbd05d1ba262cd8f7eec18c70
parentb75e2b591aded36228ba0fe31e959290f225c92f (diff)
downloadall-c66d05ce1519db73520236370d1fec1d4f3af238.tar.gz
all-c66d05ce1519db73520236370d1fec1d4f3af238.tar.bz2
all-c66d05ce1519db73520236370d1fec1d4f3af238.tar.xz
all-c66d05ce1519db73520236370d1fec1d4f3af238.zip
in status.sh show also information about not pushed commits.
-rwxr-xr-xstatus.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/status.sh b/status.sh
index 7d1f3bc..dcc5fad 100755
--- a/status.sh
+++ b/status.sh
@@ -4,9 +4,15 @@ function status {
DIR=`pwd`
cd $1
STR=`git diff --name-only`
- if [[ -n $STR ]]; then
- echo -e "$2:\e[1;31m"
- echo $STR
+ STR2=`git status|grep "Your branch is ahead"`
+ if [[ -n ${STR}${STR2} ]]; then
+ echo -e "$2:"
+ if [[ -n ${STR} ]]; then
+ echo -e "\e[1;31m${STR}"
+ fi
+ if [[ -n ${STR2} ]]; then
+ echo -e "\e[1;32m${STR2}"
+ fi
echo -e -n "\e[0m"
fi
cd $DIR