3 current="`git config --get --path remote.current.url`"
4 origin="`git config --get --path remote.origin.url`"
5 branches="master ${1:+$@}"
7 if [ -n "$origin" ]; then
8 if [ -n "$current" ]; then
9 echo "Config error (both origin and current)" >&2
15 elif [ -z "$current" ]; then
16 echo "Wrong directory error (neither origin nor current)" >&2
21 { git pull --ff-only current master || git reset --hard current/master ; } &&
23 web="`git config --get --path remote.web.url`" &&
24 if [ -n "$web" ]; then
25 git push --force web $branches
28 cd "$current" && exec git pull origin