]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
if we can't time, still check availability
authorRudolf Polzer <divverent@alientrap.org>
Tue, 5 Jun 2012 17:00:48 +0000 (19:00 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 5 Jun 2012 17:00:48 +0000 (19:00 +0200)
misc/tools/all/git.subr

index f210da95969eb7e12de4884ef97dbb04a1eae70a..31d08990cc90520ff709a549f99cd40e7b77e005 100644 (file)
@@ -53,12 +53,13 @@ testrepoflag()
 
 mirrorspeed()
 {
+       # first result is to be ignored, but we use it to check status
+       git ls-remote "$1" refs/heads/master >/dev/null 2>&1 || return 1
+       # if we can't time, we only check availability
        if ! { time -p true; } >/dev/null 2>&1; then
                echo 0
                return
        fi
-       # first result is to be ignored, but we use it to check status
-       git ls-remote "$1" refs/heads/master >/dev/null 2>&1 || return 1
        # now actually time it
        (
                set +x