diff options
author | 2013-09-13 15:04:36 +0000 | |
---|---|---|
committer | 2013-09-13 15:04:36 +0000 | |
commit | 12cab6ed3323671ca4934384bd687aa88d088233 (patch) | |
tree | 1d71b3d1415815e2dde3823453f41f792da066d1 /eclass | |
parent | added ~alpha keyword (diff) | |
download | gentoo-2-12cab6ed3323671ca4934384bd687aa88d088233.tar.gz gentoo-2-12cab6ed3323671ca4934384bd687aa88d088233.tar.bz2 gentoo-2-12cab6ed3323671ca4934384bd687aa88d088233.zip |
Do not leak EGIT_NONSHALLOW over loop iterations. Failing URL may cause non-shallow attempt to be made. When attempting next URL in the list, we should try shallow again.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 7 | ||||
-rw-r--r-- | eclass/git-r3.eclass | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 82ed1dff8379..fe5bce8ee713 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.961 2013/09/13 11:22:52 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.962 2013/09/13 15:04:36 mgorny Exp $ + + 13 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass: + Do not leak EGIT_NONSHALLOW over loop iterations. Failing URL may cause + non-shallow attempt to be made. When attempting next URL in the list, we + should try shallow again. 13 Sep 2013; Michał Górny <mgorny@gentoo.org> eutils.eclass: Commit the version of einstalldocs() Council agreed upon. diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index 4366dca965a1..d2e87df5da84 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -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.3 2013/09/09 16:01:17 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.4 2013/09/13 15:04:36 mgorny Exp $ # @ECLASS: git-r3.eclass # @MAINTAINER: @@ -401,9 +401,10 @@ git-r3_fetch() { $(git ls-remote "${r}" "${lookup_ref}") ) + local nonshallow=${EGIT_NONSHALLOW} local ref_param=() if [[ ! ${ref[0]} ]]; then - local EGIT_NONSHALLOW=1 + nonshallow=1 fi # 1. if we need a non-shallow clone and we have a shallow one, @@ -418,7 +419,7 @@ git-r3_fetch() { # if that looks beneficial. local fetch_command=( git fetch ) - if [[ ${EGIT_NONSHALLOW} ]]; then + if [[ ${nonshallow} ]]; then if [[ -f ${GIT_DIR}/shallow ]]; then ref_param+=( --unshallow ) fi |