[[ $4 == W ]] || exit 0 cd $GL_REPO_BASE/$2.git head=`git symbolic-ref HEAD` [[ -f $head ]] || { set -- refs/heads/* git symbolic-ref HEAD $1 }