diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-03-02 11:48:28 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-03-02 11:48:28 +0000 |
commit | c523c9f21600dd956240fde028cef6a8e1b02b5b (patch) | |
tree | bc5d7b99aca7b673022cb196cf5617618a579837 /eclass | |
parent | Support EGIT_CLONE_TYPE=shallow. (diff) | |
download | gentoo-2-c523c9f21600dd956240fde028cef6a8e1b02b5b.tar.gz gentoo-2-c523c9f21600dd956240fde028cef6a8e1b02b5b.tar.bz2 gentoo-2-c523c9f21600dd956240fde028cef6a8e1b02b5b.zip |
Auto-unshallow when fetching by commit hash.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/git-r3.eclass | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 2053ef84e233..3f5a31acee9a 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.1158 2014/03/02 11:48:05 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1159 2014/03/02 11:48:28 mgorny Exp $ + + 02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass: + Auto-unshallow when fetching by commit hash. 02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass: Support EGIT_CLONE_TYPE=shallow. diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index 5c68f45f8b41..0a1945fa6115 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.33 2014/03/02 11:48:05 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.34 2014/03/02 11:48:28 mgorny Exp $ # @ECLASS: git-r3.eclass # @MAINTAINER: @@ -449,13 +449,18 @@ git-r3_fetch() { # tag fetch_l=refs/tags/${remote_ref} else - # commit, so we need to fetch the branch - # and guess where it takes us... + # commit + # so we need to fetch the branch if [[ ${branch} ]]; then fetch_l=${branch} else fetch_l=HEAD fi + + # fetching by commit in shallow mode? can't do. + if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then + local EGIT_CLONE_TYPE=single + fi fi fi |