summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-09-13 15:04:36 +0000
committerMichał Górny <mgorny@gentoo.org>2013-09-13 15:04:36 +0000
commit12cab6ed3323671ca4934384bd687aa88d088233 (patch)
tree1d71b3d1415815e2dde3823453f41f792da066d1 /eclass/git-r3.eclass
parentadded ~alpha keyword (diff)
downloadgentoo-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/git-r3.eclass')
-rw-r--r--eclass/git-r3.eclass7
1 files changed, 4 insertions, 3 deletions
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