diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-05 12:31:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-05 12:31:51 +0300 |
commit | c66d05ce1519db73520236370d1fec1d4f3af238 (patch) | |
tree | a2686a629bffbc6fbd05d1ba262cd8f7eec18c70 | |
parent | b75e2b591aded36228ba0fe31e959290f225c92f (diff) | |
download | all-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-x | status.sh | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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 |