summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-03-02 11:50:23 +0000
committerMichał Górny <mgorny@gentoo.org>2014-03-02 11:50:23 +0000
commitd68254545b6a95c65568cc16b8df30078a7956aa (patch)
treeda8ee3eb92986377382cf1fefa40ac9bcdd9193f /eclass
parentia64 stable wrt bug #502802 (diff)
downloadhistorical-d68254545b6a95c65568cc16b8df30078a7956aa.tar.gz
historical-d68254545b6a95c65568cc16b8df30078a7956aa.tar.bz2
historical-d68254545b6a95c65568cc16b8df30078a7956aa.zip
Do not try shallow clones on local repositories.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/git-r3.eclass10
2 files changed, 11 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 5241e5d76ec9..5a321310b95b 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1161 2014/03/02 11:49:49 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1162 2014/03/02 11:50:23 mgorny Exp $
+
+ 02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+ Do not try shallow clones on local repositories.
02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
Force non-forward updates on git refs.
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index a254902ec9d1..4fab97b15cc4 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.36 2014/03/02 11:49:49 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.37 2014/03/02 11:50:23 mgorny Exp $
# @ECLASS: git-r3.eclass
# @MAINTAINER:
@@ -507,9 +507,13 @@ git-r3_fetch() {
fi
if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
- # use '--depth 1' when fetching a new branch
- if [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
+ if _git-r3_is_local_repo; then
+ # '--depth 1' causes sandbox violations with local repos
+ # bug #491260
+ local EGIT_CLONE_TYPE=single
+ elif [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
then
+ # use '--depth 1' when fetching a new branch
fetch_command+=( --depth 1 )
fi
else # non-shallow mode