Fixed the get_current_branch BASH function.

(cherry picked from commit 74283f57e20d6ebc4f1bed9f80b20ddc3bf73d76)
This commit is contained in:
Ramon Novoa 2016-05-11 10:13:24 +02:00
parent 0e76af6042
commit 6c804ba725

View File

@ -10,9 +10,6 @@ CONSOLEHOME=$CODEHOME/pandora_console
CONSOLEHOME_ENT=$CODEHOME_ENT/pandora_console
function get_current_branch {
cd "$CODEHOME" || return ""
BRANCH=`git branch 2>/dev/null | grep \* | awk '{print $2}'`
cd -
return $BRANCH
echo `cd "$CODEHOME" && git branch 2>/dev/null | grep \* | awk '{print $2}'`
}