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: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=ae49f4945d697ac3c7faa100ea4eef27b544787c 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