fi
if [ "${#branches[*]}" -eq 0 ]; then
- branches=(`git branch --points-at=HEAD -r | sed 's!^ *origin/!!'`)
+ branches=(`git for-each-ref --format="%(refname:lstrip=3)" --points-at=HEAD refs/remotes | sort -u`)
fi
if [ "${#branches[*]}" -eq 0 ]; then