]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/pushall: iterate and retry
authorJunio C Hamano <gitster@pobox.com>
Fri, 20 Dec 2013 23:01:32 +0000 (15:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Dec 2013 23:01:32 +0000 (15:01 -0800)
pushall

diff --git a/pushall b/pushall
index e46ddf6086de6b2dbe2dc156f8dc9e4550dc6690..d262e9f823a74c82b976369e4453144ca6e3a67c 100755 (executable)
--- a/pushall
+++ b/pushall
@@ -1,10 +1,25 @@
 #!/bin/sh
 
-# for remote in ko repo gph github2 sfjp sf.net
-for remote in ko repo gph github2 sfjp sf.net
+sites='ko repo github2 sfjp sf.net gph '
+
+while :
 do
-       printf "%s: " "$remote"
-       git push --follow-tags "$remote" "$@" || exit $?
+       failed=
+       for remote in $sites
+       do
+               printf "%s: " "$remote"
+               git push --follow-tags "$remote" "$@" || failed="$failed$remote "
+       done
+
+       if test -z "$failed"
+       then
+               break
+       elif test "x$sites" = "x$failed"
+       then
+               echo >&2 "Failed to push to: $sites"
+               exit 1
+       fi
+       sites="$failed"
 done
 
 case "$#,$*" in