diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-10 21:50:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-10 21:50:01 +0300 |
commit | ef9a68cc014c8a32ec7dd466a69978d77c45add3 (patch) | |
tree | eaf1196cd81508d87276a6deb0209876fb8dc8c5 | |
parent | 85b0c87088ac499f96adce92c014b92e729c27bb (diff) | |
download | evol-all-ef9a68cc014c8a32ec7dd466a69978d77c45add3.tar.gz evol-all-ef9a68cc014c8a32ec7dd466a69978d77c45add3.tar.bz2 evol-all-ef9a68cc014c8a32ec7dd466a69978d77c45add3.tar.xz evol-all-ef9a68cc014c8a32ec7dd466a69978d77c45add3.zip |
Show branch name in all scripts.halloween2015
-rwxr-xr-x | git.sh | 2 | ||||
-rwxr-xr-x | pull.sh | 4 | ||||
-rwxr-xr-x | push.sh | 2 | ||||
-rwxr-xr-x | status.sh | 4 |
4 files changed, 6 insertions, 6 deletions
@@ -8,7 +8,7 @@ function status { fi DIR=$(pwd) cd "$1" - echo "$2:" + echo "$2 ($(git symbolic-ref --short -q HEAD)):" git $CMD cd "$DIR" } @@ -8,7 +8,7 @@ function status { fi DIR=$(pwd) cd "$1" - echo "$2:" + echo "$2 ($(git symbolic-ref --short -q HEAD)):" if [[ "${CMD}" == "force" ]]; then git pull --commit --no-edit cd "$DIR" @@ -34,7 +34,7 @@ function status2 { STR=$(git diff --name-only) STR2=$(git status|grep "Your branch is ahead") STR3=$(git status -s -uno) - echo "$2:" + echo "$2 ($(git symbolic-ref --short -q HEAD)):" if [[ -n "${STR}${STR2}${STR3}" ]]; then echo -e "\e[1;31mCant pull because changes not pushed\e[0m" else @@ -10,7 +10,7 @@ function status { cd "$1" STR=$(git status|grep "Your branch is ahead") if [[ -n "${STR}" ]]; then - echo "Pushing $2" + echo "Pushing $2 ($(git symbolic-ref --short -q HEAD))" git push $CMD fi cd "$DIR" @@ -24,11 +24,11 @@ function status { STR3=$(git status -s -uno) if [[ "${CMD}" == "commit" || "${CMD}" == "c" ]]; then COMMIT=$(git rev-parse HEAD) - echo -e "$2: \e[1;33m${COMMIT}\e[0m" + echo -e "$2 ($(git symbolic-ref --short -q HEAD)): \e[1;33m${COMMIT}\e[0m" fi if [[ -n "${STR}${STR2}${STR3}" ]]; then if [[ "${CMD}" != "commit" && "${CMD}" != "c" ]]; then - echo "$2:" + echo "$2 ($(git symbolic-ref --short -q HEAD)):" fi if [[ -n ${STR2} ]]; then echo -e "\e[1;32m${STR2}\e[0m" |