From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2FAD21381F3 for ; Fri, 13 Sep 2013 15:08:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 157A3E0B41; Fri, 13 Sep 2013 15:08:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A473BE0B41 for ; Fri, 13 Sep 2013 15:08:39 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9F8FA33EB13 for ; Fri, 13 Sep 2013 15:08:38 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2279) id 6A3B52004C; Fri, 13 Sep 2013 15:08:37 +0000 (UTC) From: "Michal Gorny (mgorny)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, mgorny@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog git-r3.eclass X-VCS-Directories: eclass X-VCS-Committer: mgorny X-VCS-Committer-Name: Michal Gorny Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130913150837.6A3B52004C@flycatcher.gentoo.org> Date: Fri, 13 Sep 2013 15:08:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 800da6c8-aa41-4d28-a2ac-a0061f0110fe X-Archives-Hash: ea48cd143168b63ee237eda12460ce9f mgorny 13/09/13 15:08:37 Modified: ChangeLog git-r3.eclass Log: Fail early on unreachable URLs. If ls-remote fails due to server being unreachable, there is no point in attempting to fetch. Revision Changes Path 1.963 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.963&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.963&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.962&r2=1.963 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.962 retrieving revision 1.963 diff -u -r1.962 -r1.963 --- ChangeLog 13 Sep 2013 15:04:36 -0000 1.962 +++ ChangeLog 13 Sep 2013 15:08:37 -0000 1.963 @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.962 2013/09/13 15:04:36 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.963 2013/09/13 15:08:37 mgorny Exp $ + + 13 Sep 2013; Michał Górny git-r3.eclass: + Fail early on unreachable URLs. If ls-remote fails due to server being + unreachable, there is no point in attempting to fetch. 13 Sep 2013; Michał Górny git-r3.eclass: Do not leak EGIT_NONSHALLOW over loop iterations. Failing URL may cause 1.5 eclass/git-r3.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.5&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.5&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.4&r2=1.5 Index: git-r3.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- git-r3.eclass 13 Sep 2013 15:04:36 -0000 1.4 +++ git-r3.eclass 13 Sep 2013 15:08:37 -0000 1.5 @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.4 2013/09/13 15:04:36 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.5 2013/09/13 15:08:37 mgorny Exp $ # @ECLASS: git-r3.eclass # @MAINTAINER: @@ -398,9 +398,12 @@ # split on whitespace local ref=( - $(git ls-remote "${r}" "${lookup_ref}") + $(git ls-remote "${r}" "${lookup_ref}" || echo __FAIL__) ) + # normally, ref[0] is a hash, so we can do magic strings here + [[ ${ref[0]} == __FAIL__ ]] && continue + local nonshallow=${EGIT_NONSHALLOW} local ref_param=() if [[ ! ${ref[0]} ]]; then