#! /bin/sh
set -e
-branches="master ${1:+$@}"
current="`git config --get --path remote.current.url`" || :
origin="`git config --get --path remote.origin.url`" || :
web="`git config --get --path remote.web.url`" || :
remotes="`git config --get update-remotes.remotes`" || :
+branches="`git config --get update-remotes.branches`" || :
if [ -n "$origin" ]; then
if [ -n "$current" ]; then
else
rsync -ahPv update-remotes "$origin"
cd "$origin"
- exec ./update-remotes "$@"
+ exec ./update-remotes
fi
elif [ -z "$current" ]; then
echo "Wrong directory error (neither origin nor current)" >&2
git set-date
if [ -n "$web" ]; then
- git push --force web $branches
+ git push --force web master $branches
fi
cd "$current"
for remote in $remotes; do
- git push --force $remote $branches
+ git push --force $remote master $branches
done
git pull origin