From: Rudolf Polzer Date: Tue, 5 Jun 2012 17:00:48 +0000 (+0200) Subject: if we can't time, still check availability X-Git-Tag: xonotic-v0.7.0~54^2^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ae49f4945d697ac3c7faa100ea4eef27b544787c;p=xonotic%2Fxonotic.git if we can't time, still check availability --- diff --git a/misc/tools/all/git.subr b/misc/tools/all/git.subr index f210da95..31d08990 100644 --- a/misc/tools/all/git.subr +++ b/misc/tools/all/git.subr @@ -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