support pushurl
authorrpolzer <rpolzer@hagger.div0.qc.to>
Mon, 4 Oct 2010 10:14:12 +0000 (12:14 +0200)
committerrpolzer <rpolzer@hagger.div0.qc.to>
Mon, 4 Oct 2010 10:14:12 +0000 (12:14 +0200)
all

diff --git a/all b/all
index 8f4d25b7818b24d48c97e0f8da941c4f834d44f5..5812b82f577b8b1c67d4d9297ec5e65227ac9755 100755 (executable)
--- a/all
+++ b/all
@@ -343,9 +343,9 @@ case "$cmd" in
                                        fix_git_config
                                        verbose git config remote.origin.url "$url"
                                        if [ -n "$pushurl" ]; then
-                                               verbose git config --unset remote.origin.pushurl
-                                       else
                                                verbose git config remote.origin.pushurl "$pushurl"
+                                       else
+                                               verbose git config --unset remote.origin.pushurl
                                        fi
                                        verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
                                        r=`git symbolic-ref HEAD`
@@ -371,9 +371,9 @@ case "$cmd" in
                                verbose git clone "$url" "$d0/$d"
                                enter "$d0/$d" verbose
                                if [ -n "$pushurl" ]; then
-                                       verbose git config --unset remote.origin.pushurl
-                               else
                                        verbose git config remote.origin.pushurl "$pushurl"
+                               else
+                                       verbose git config --unset remote.origin.pushurl
                                fi
                                fix_git_config
                                if [ "$branch" != "master" ]; then