From ae49f4945d697ac3c7faa100ea4eef27b544787c Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 5 Jun 2012 19:00:48 +0200 Subject: [PATCH] if we can't time, still check availability --- misc/tools/all/git.subr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.2