diff options
author | 2014-03-02 11:50:23 +0000 | |
---|---|---|
committer | 2014-03-02 11:50:23 +0000 | |
commit | 104e1eeac0a1a9eaf6fb9999fef5c955d9683d9f (patch) | |
tree | 9ca2c4f8dde30c1db0bf7a72d4aabbc791764d6e /eclass | |
parent | amd64 stable, bug #502210 (diff) | |
download | gentoo-2-104e1eeac0a1a9eaf6fb9999fef5c955d9683d9f.tar.gz gentoo-2-104e1eeac0a1a9eaf6fb9999fef5c955d9683d9f.tar.bz2 gentoo-2-104e1eeac0a1a9eaf6fb9999fef5c955d9683d9f.zip |
Do not try shallow clones on local repositories.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/git-r3.eclass | 10 |
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 |