summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit.sh2
-rwxr-xr-xpull.sh4
-rwxr-xr-xpush.sh2
-rwxr-xr-xstatus.sh4
4 files changed, 6 insertions, 6 deletions
diff --git a/git.sh b/git.sh
index 5a2a5d7..151a3a4 100755
--- a/git.sh
+++ b/git.sh
@@ -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"
}
diff --git a/pull.sh b/pull.sh
index 93a49d6..1b044df 100755
--- a/pull.sh
+++ b/pull.sh
@@ -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
diff --git a/push.sh b/push.sh
index bcf61df..5f37fb9 100755
--- a/push.sh
+++ b/push.sh
@@ -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"
diff --git a/status.sh b/status.sh
index 6ffc68c..5ee5bad 100755
--- a/status.sh
+++ b/status.sh
@@ -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"