6 [[ -n ${cmd} ]] && acmd=$(git config --get "alias.${cmd}")
8 case ${acmd:-${cmd}} in
10 if [[ $1 == "all" ]] ; then
12 branches=$(g b | awk '
14 if ($0 ~ "^[*] *[(]no branch[)]") {
16 } else if ($1 == "*") {
22 END { print list b }')
23 for b in ${branches} ; do
35 while [[ ! -d ${root}/.repo && ${root} != "/" ]] ; do
38 cd "${root}" || exit 1
40 if [[ ! -e .repo/sandbox-url ]] ; then
41 echo "Please configure remote url base in ${root}/.repo/sandbox-url"
44 remote=$(<.repo/sandbox-url) || exit 1
46 echo "pushing projects from ${root}"
50 tcnt=$(echo "${rlist}" | wc -l)
55 export GIT_DIR=${path}/.git
57 printf '### (%*i/%i %3i%%) %s\n' \
58 ${#tcnt} $((cnt++)) ${tcnt} $(( cnt * 100 / tcnt )) ${proj}
60 g l -1 ${src} >& /dev/null || src=
61 ( g push --force ${remote}/${proj} ${src}:refs/sandbox/${USER}/${sync_branch} >/dev/null ) &
63 # ssh servers do not like it when you hammer them :)
64 # Received disconnect from 74.125.248.80: 7: Too many concurrent connections
65 # fatal: The remote end hung up unexpectedly
67 if [[ ${#pids[@]} -eq 20 ]] ; then
78 exec repo ${acmd:-${cmd}} "$@"