Scripts: Fix branch detection with git older than 1.7.10

v3.5.13-sru
Slávek Banko 12 years ago
parent bb470b8851
commit 4816dfe852

@ -6,7 +6,7 @@ if [[ ! -e .git ]] ||
exit 1
fi
branch=`git symbolic-ref --short -q HEAD`
branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"`
if [[ -z "$branch" ]] ||
[[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
echo "There is not active upstream branch. Exiting..."

@ -6,7 +6,7 @@ if [[ ! -e .git ]] ||
exit 1
fi
branch=`git symbolic-ref --short -q HEAD`
branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"`
if [[ -z "$branch" ]] ||
[[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
echo "There is not active upstream branch. Exiting..."

@ -12,7 +12,7 @@ if [[ ! -e .git ]] ||
exit 1
fi
branch=`git symbolic-ref --short -q HEAD`
branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"`
if [[ -z "$branch" ]] ||
[[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then
echo "There is not active upstream branch. Exiting..."

Loading…
Cancel
Save