fix a minor bug in ./all push
authorRudolf Polzer <divverent@alientrap.org>
Fri, 16 Apr 2010 17:36:41 +0000 (19:36 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 16 Apr 2010 17:36:41 +0000 (19:36 +0200)
all

diff --git a/all b/all
index bf6dfb9856c062e4f2f5af9827abf4bbdcc5d1e1..e4316a0c8a2d84a92ba3ee6f5f196c0fa1cad81b 100755 (executable)
--- a/all
+++ b/all
@@ -312,14 +312,15 @@ case "$cmd" in
                                        verbose git commit -a
                                fi
                        fi
                                        verbose git commit -a
                                fi
                        fi
-                       if git log "origin/$r".."$r" | grep .; then
+                       rem=`git config "branch.$r.remote" || echo origin`
+                       if git log "$rem/$r".."$r" | grep .; then
                                a=
                                while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
                                        echo "Push \"$r\" in $dv?"
                                        read -r a
                                done
                                if [ x"$a" = x"y" ]; then
                                a=
                                while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
                                        echo "Push \"$r\" in $dv?"
                                        read -r a
                                done
                                if [ x"$a" = x"y" ]; then
-                                       verbose git push `git config "branch.$r.remote" || echo origin` HEAD
+                                       verbose git push "$rem" HEAD
                                fi
                        fi
                        cd "$d0"
                                fi
                        fi
                        cd "$d0"