diff options
-rwxr-xr-x | pull.sh | 2 | ||||
-rwxr-xr-x | status.sh | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -13,7 +13,7 @@ function status { return fi STR=$(git diff --name-only) - STR2=$(git status|grep "Your branch is ahead") + STR2=$(git status|grep "Your branch is ahead")$(git status|grep -E "have diverged") STR3=$(git status -s -uno) if [[ -n "${STR}${STR2}${STR3}" ]]; then echo -e "\e[1;31mCant pull because changes not pushed\e[0m" @@ -7,7 +7,7 @@ function status { DIR=$(pwd) cd "$1" STR=$(git diff --stat --color=always) - STR2=$(git status|grep -E "Your branch is (behind|ahead)") + STR2=$(git status|grep -E "Your branch is (behind|ahead)")$(git status|grep -E "have diverged") STR3=$(git status -s -uno) if [[ "${CMD}" == "commit" || "${CMD}" == "c" ]]; then COMMIT=$(git rev-parse HEAD) |