- branches=$(g b | awk '
- {
- if ($0 ~ "^[*] *[(]no branch[)]") {
- next
- } else if ($0 ~ "^[*] *[(](HEAD )?detached (from|at) ") {
- next
- } else if ($1 == "*") {
- b = $2
- } else {
- list = list $1 " "
- }
- }
- END { print list b }')
- [[ -z ${branches} ]] && exit 0
-
- [[ -z ${GOOD} ]] && eval $(bash-colors --env)
- #echo "${GOOD}### ${PWD}${NORMAL}"
- # Skip if rebase is in progress.
- if [[ -e .git/rebase-merge/interactive ]] ; then
- echo -e "# ${_proj}: ${WARN}skipping due to active rebase${NORMAL}"
- exit 1
- fi
- for b in ${branches} ; do
- #echo " ${HILITE}### $b${NORMAL}"
- g co -q $b || exit 1
- if ! r rb -q "$@" ; then
- g rb-a
- fi
- done
- exit 0