use force when updating googlecode

This commit is contained in:
Pavol Zibrita 2012-05-09 00:57:49 +02:00
parent df1365504f
commit 37d07faee1

View file

@ -5,13 +5,14 @@
# url = https://code.google.com/p/osmand/ # url = https://code.google.com/p/osmand/
# fetch = +refs/heads/*:refs/remotes/google/* # fetch = +refs/heads/*:refs/remotes/google/*
git fetch origin -p git fetch origin -p
git fetch google --all git fetch google
# Delete old branches # Delete old branches
for f in `git for-each-ref --format='%(refname)' | grep 'refs/remotes/google'` for f in `git for-each-ref --format='%(refname)' | grep 'refs/remotes/google'`
do do
Branch=`echo $f | cut -d '/' -f 4` Branch=`echo $f | cut -d '/' -f 4`
if [[ -z `git show-ref refs/remotes/origin/$Branch` ]]; then if [[ -z `git show-ref refs/remotes/origin/$Branch` ]]; then
echo git push google :$Branch
git push google :$Branch git push google :$Branch
fi fi
done done
@ -20,7 +21,8 @@ done
for f in `git for-each-ref --format='%(refname)' | grep 'refs/remotes/origin'` for f in `git for-each-ref --format='%(refname)' | grep 'refs/remotes/origin'`
do do
Branch=`echo $f | cut -d '/' -f 4` Branch=`echo $f | cut -d '/' -f 4`
git push google origin/$Branch:refs/heads/$Branch echo git push google origin/$Branch:refs/heads/$Branch
git push google origin/$Branch:refs/heads/$Branch --force
done done
echo "Synchronization is ok" echo "Synchronization is ok"