public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-06-01 22:07 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-06-01 22:07 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/06/01 22:07:59

  Modified:             ChangeLog git-r3.eclass
  Log:
  Properly canonicalize relative submodule URIs, bug #501250.

Revision  Changes    Path
1.1279               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1279&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1279&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1278&r2=1.1279

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1278
retrieving revision 1.1279
diff -u -r1.1278 -r1.1279
--- ChangeLog	31 May 2014 10:23:36 -0000	1.1278
+++ ChangeLog	1 Jun 2014 22:07:59 -0000	1.1279
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1278 2014/05/31 10:23:36 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1279 2014/06/01 22:07:59 mgorny Exp $
+
+  01 Jun 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass,
+  +tests/git-r3:subrepos.sh:
+  Properly canonicalize relative submodule URIs, bug #501250.
 
   31 May 2014; Michał Górny <mgorny@gentoo.org> systemd.eclass:
   Add systemd_{do,new}userunit.



1.43                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.42&r2=1.43

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- git-r3.eclass	23 May 2014 07:09:07 -0000	1.42
+++ git-r3.eclass	1 Jun 2014 22:07:59 -0000	1.43
@@ -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.42 2014/05/23 07:09:07 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.43 2014/06/01 22:07:59 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -352,6 +352,49 @@
 	done < <(echo "${data}" | git config -f /dev/fd/0 -l || die)
 }
 
+# @FUNCTION: _git-r3_set_subrepos
+# @USAGE: <submodule-uri> <parent-repo-uri>...
+# @INTERNAL
+# @DESCRIPTION:
+# Create 'subrepos' array containing absolute (canonical) submodule URIs
+# for the given <submodule-uri>. If the URI is relative, URIs will be
+# constructed using all <parent-repo-uri>s. Otherwise, this single URI
+# will be placed in the array.
+_git-r3_set_subrepos() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local suburl=${1}
+	subrepos=( "${@:2}" )
+
+	if [[ ${suburl} == ./* || ${suburl} == ../* ]]; then
+		# drop all possible trailing slashes for consistency
+		subrepos=( "${subrepos[@]%%/}" )
+
+		while true; do
+			if [[ ${suburl} == ./* ]]; then
+				suburl=${suburl:2}
+			elif [[ ${suburl} == ../* ]]; then
+				suburl=${suburl:3}
+
+				# XXX: correctness checking
+
+				# drop the last path component
+				subrepos=( "${subrepos[@]%/*}" )
+				# and then the trailing slashes, again
+				subrepos=( "${subrepos[@]%%/}" )
+			else
+				break
+			fi
+		done
+
+		# append the preprocessed path to the preprocessed URIs
+		subrepos=( "${subrepos[@]/%//${suburl}}")
+	else
+		subrepos=( "${suburl}" )
+	fi
+}
+
+
 # @FUNCTION: _git-r3_is_local_repo
 # @USAGE: <repo-uri>
 # @INTERNAL
@@ -645,11 +688,9 @@
 			if [[ ! ${commit} ]]; then
 				die "Unable to get commit id for submodule ${subname}"
 			fi
-			if [[ ${url} == ./* || ${url} == ../* ]]; then
-				local subrepos=( "${repos[@]/%//${url}}" )
-			else
-				local subrepos=( "${url}" )
-			fi
+
+			local subrepos
+			_git-r3_set_subrepos "${url}" "${repos[@]}"
 
 			git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
 
@@ -781,10 +822,8 @@
 			local subname=${submodules[0]}
 			local url=${submodules[1]}
 			local path=${submodules[2]}
-
-			if [[ ${url} == ./* || ${url} == ../* ]]; then
-				url=${repos[0]%%/}/${url}
-			fi
+			local subrepos
+			_git-r3_set_subrepos "${url}" "${repos[@]}"
 
 			git-r3_checkout "${url}" "${out_dir}/${path}" \
 				"${local_id}/${subname}"





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2015-08-08  9:32 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2015-08-08  9:32 UTC (permalink / raw
  To: gentoo-commits

mgorny      15/08/08 09:32:50

  Modified:             ChangeLog git-r3.eclass
  Log:
  Add some boldness to output. Update/fix pkg_needrebuild() for smart-live-rebuild.

Revision  Changes    Path
1.1750               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1750&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1750&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1749&r2=1.1750

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1749
retrieving revision 1.1750
diff -u -r1.1749 -r1.1750
--- ChangeLog	7 Aug 2015 02:05:19 -0000	1.1749
+++ ChangeLog	8 Aug 2015 09:32:50 -0000	1.1750
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1749 2015/08/07 02:05:19 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1750 2015/08/08 09:32:50 mgorny Exp $
+
+  08 Aug 2015; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Add some boldness to output. Update/fix pkg_needrebuild() for
+  smart-live-rebuild.
 
   07 Aug 2015; Davide Pesavento <pesa@gentoo.org> qt5-build.eclass:
   Fix bugs #549140 and #552942.



1.51                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.50&r2=1.51

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- git-r3.eclass	9 Jul 2015 20:21:05 -0000	1.50
+++ git-r3.eclass	8 Aug 2015 09:32:50 -0000	1.51
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.50 2015/07/09 20:21:05 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.51 2015/08/08 09:32:50 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -185,19 +185,19 @@
 			;;
 		single)
 			if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
-				einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting"
+				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle\e[22m' mode, adjusting"
 				EGIT_CLONE_TYPE=single
 			fi
 			;;
 		single+tags)
 			if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
-				einfo "git-r3: ebuild needs to be cloned in 'single+tags' mode, adjusting"
+				einfo "git-r3: ebuild needs to be cloned in '\e[1msingle+tags\e[22m' mode, adjusting"
 				EGIT_CLONE_TYPE=single+tags
 			fi
 			;;
 		mirror)
 			if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
-				einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting"
+				einfo "git-r3: ebuild needs to be cloned in '\e[1mmirror\e[22m' mode, adjusting"
 				EGIT_CLONE_TYPE=mirror
 			fi
 			;;
@@ -532,7 +532,7 @@
 		umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
 	fi
 	for r in "${repos[@]}"; do
-		einfo "Fetching ${r} ..."
+		einfo "Fetching \e[1m${r}\e[22m ..."
 
 		local fetch_command=( git fetch "${r}" )
 		local clone_type=${EGIT_CLONE_TYPE}
@@ -553,11 +553,11 @@
 			# so automatically switch to single+tags mode.
 			if [[ ${clone_type} == shallow ]]; then
 				einfo "  Google Code does not support shallow clones"
-				einfo "  using EGIT_CLONE_TYPE=single+tags"
+				einfo "  using \e[1mEGIT_CLONE_TYPE=single+tags\e[22m"
 				clone_type=single+tags
 			elif [[ ${clone_type} == single ]]; then
 				einfo "  git-r3: Google Code does not send tags properly in 'single' mode"
-				einfo "  using EGIT_CLONE_TYPE=single+tags"
+				einfo "  using \e[1mEGIT_CLONE_TYPE=single+tags\e[22m"
 				clone_type=single+tags
 			fi
 		fi
@@ -771,7 +771,7 @@
 	local -x GIT_DIR
 	_git-r3_set_gitdir "${repos[0]}"
 
-	einfo "Checking out ${repos[0]} to ${out_dir} ..."
+	einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\[e22m ..."
 
 	if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
 		if [[ ${EVCS_OFFLINE} ]]; then
@@ -916,7 +916,7 @@
 
 	local r success
 	for r in "${repos[@]}"; do
-		einfo "Peeking ${remote_ref} on ${r} ..." >&2
+		einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
 
 		local is_branch lookup_ref
 		if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
@@ -966,16 +966,23 @@
 }
 
 # https://bugs.gentoo.org/show_bug.cgi?id=482666
-git-r3_pkg_outofdate() {
+git-r3_pkg_needrebuild() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	local new_commit_id=$(git-r3_peek_remote_ref)
-	ewarn "old: ${EGIT_VERSION}"
-	ewarn "new: ${new_commit_id}"
-	[[ ${new_commit_id} && ${old_commit_id} ]] || return 2
+	[[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
+
+	if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
+		einfo "Update from \e[1m${EGIT_VERSION}\e[22m to \e[1m${new_commit_id}\e[22m"
+	else
+		einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
+	fi
 
 	[[ ${EGIT_VERSION} != ${new_commit_id} ]]
 }
 
+# 'export' locally until this gets into EAPI
+pkg_needrebuild() { git-r3_pkg_needrebuild; }
+
 _GIT_R3=1
 fi





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2015-07-09 20:21 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2015-07-09 20:21 UTC (permalink / raw
  To: gentoo-commits

mgorny      15/07/09 20:21:05

  Modified:             ChangeLog git-r3.eclass
  Log:
  Do not attempt to use submodules for which the checkout path does not exist (has been removed), bug #551100.

Revision  Changes    Path
1.1707               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1707&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1707&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1706&r2=1.1707

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1706
retrieving revision 1.1707
diff -u -r1.1706 -r1.1707
--- ChangeLog	9 Jul 2015 15:43:03 -0000	1.1706
+++ ChangeLog	9 Jul 2015 20:21:05 -0000	1.1707
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1706 2015/07/09 15:43:03 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1707 2015/07/09 20:21:05 mgorny Exp $
+
+  09 Jul 2015; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Do not attempt to use submodules for which the checkout path does not exist
+  (has been removed), bug #551100.
 
   09 Jul 2015; Michał Górny <mgorny@gentoo.org> gnome2.eclass:
   Remove meaningless nonfatal from elibtoolize call, bug #551154.



1.50                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.49&r2=1.50

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- git-r3.eclass	22 Jun 2015 08:39:36 -0000	1.49
+++ git-r3.eclass	9 Jul 2015 20:21:05 -0000	1.50
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.49 2015/06/22 08:39:36 mrueg Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.50 2015/07/09 20:21:05 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -710,16 +710,23 @@
 			local subname=${submodules[0]}
 			local url=${submodules[1]}
 			local path=${submodules[2]}
-			local commit=$(git rev-parse "${local_ref}:${path}")
 
-			if [[ ! ${commit} ]]; then
-				die "Unable to get commit id for submodule ${subname}"
-			fi
+			# use only submodules for which path does exist
+			# (this is in par with 'git submodule'), bug #551100
+			# note: git cat-file does not work for submodules
+			if [[ $(git ls-tree -d "${local_ref}" "${path}") ]]
+			then
+				local commit=$(git rev-parse "${local_ref}:${path}" || die)
 
-			local subrepos
-			_git-r3_set_subrepos "${url}" "${repos[@]}"
+				if [[ ! ${commit} ]]; then
+					die "Unable to get commit id for submodule ${subname}"
+				fi
 
-			git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
+				local subrepos
+				_git-r3_set_subrepos "${url}" "${repos[@]}"
+
+				git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
+			fi
 
 			submodules=( "${submodules[@]:3}" ) # shift
 		done
@@ -849,11 +856,16 @@
 			local subname=${submodules[0]}
 			local url=${submodules[1]}
 			local path=${submodules[2]}
-			local subrepos
-			_git-r3_set_subrepos "${url}" "${repos[@]}"
 
-			git-r3_checkout "${subrepos[*]}" "${out_dir}/${path}" \
-				"${local_id}/${subname}"
+			# use only submodules for which path does exist
+			# (this is in par with 'git submodule'), bug #551100
+			if [[ -d ${out_dir}/${path} ]]; then
+				local subrepos
+				_git-r3_set_subrepos "${url}" "${repos[@]}"
+
+				git-r3_checkout "${subrepos[*]}" "${out_dir}/${path}" \
+					"${local_id}/${subname}"
+			fi
 
 			submodules=( "${submodules[@]:3}" ) # shift
 		done





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2015-06-22  8:39 Manuel Rueger (mrueg)
  0 siblings, 0 replies; 47+ messages in thread
From: Manuel Rueger (mrueg) @ 2015-06-22  8:39 UTC (permalink / raw
  To: gentoo-commits

mrueg       15/06/22 08:39:36

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fix typo.

Revision  Changes    Path
1.1677               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1677&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1677&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1676&r2=1.1677

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1676
retrieving revision 1.1677
diff -u -r1.1676 -r1.1677
--- ChangeLog	19 Jun 2015 14:11:24 -0000	1.1676
+++ ChangeLog	22 Jun 2015 08:39:36 -0000	1.1677
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1676 2015/06/19 14:11:24 chewi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1677 2015/06/22 08:39:36 mrueg Exp $
+
+  22 Jun 2015; Manuel Rüger <mrueg@gentoo.org> git-r3.eclass:
+  Fix typo.
 
   19 Jun 2015; James Le Cuirot <chewi@gentoo.org> java-utils-2.eclass:
   Allow EANT_GENTOO_CLASSPATH_EXTRA to work when EANT_GENTOO_CLASSPATH is



1.49                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.49&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.49&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.48&r2=1.49

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- git-r3.eclass	4 Feb 2015 09:44:24 -0000	1.48
+++ git-r3.eclass	22 Jun 2015 08:39:36 -0000	1.49
@@ -1,13 +1,13 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.48 2015/02/04 09:44:24 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.49 2015/06/22 08:39:36 mrueg Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
 # Michał Górny <mgorny@gentoo.org>
 # @BLURB: Eclass for fetching and unpacking git repositories.
 # @DESCRIPTION:
-# Third generation eclass for easing maitenance of live ebuilds using
+# Third generation eclass for easing maintenance of live ebuilds using
 # git as remote repository.
 
 case "${EAPI:-0}" in





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-07-28 14:13 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-07-28 14:13 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/07/28 14:13:50

  Modified:             ChangeLog git-r3.eclass
  Log:
  Mention git-clone man page for URI syntax, bug #511636.

Revision  Changes    Path
1.1327               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1327&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1327&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1326&r2=1.1327

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1326
retrieving revision 1.1327
diff -u -r1.1326 -r1.1327
--- ChangeLog	28 Jul 2014 14:12:22 -0000	1.1326
+++ ChangeLog	28 Jul 2014 14:13:50 -0000	1.1327
@@ -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.1326 2014/07/28 14:12:22 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1327 2014/07/28 14:13:50 mgorny Exp $
+
+  28 Jul 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Mention git-clone man page for URI syntax, bug #511636.
 
   28 Jul 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Use ROOT=/ when checking for git features, bug #518374. Patch provided by



1.47                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.47&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.47&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.46&r2=1.47

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- git-r3.eclass	28 Jul 2014 14:12:22 -0000	1.46
+++ git-r3.eclass	28 Jul 2014 14:13:50 -0000	1.47
@@ -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.46 2014/07/28 14:12:22 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.47 2014/07/28 14:13:50 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -114,7 +114,8 @@
 # @DESCRIPTION:
 # URIs to the repository, e.g. git://foo, https://foo. If multiple URIs
 # are provided, the eclass will consider them as fallback URIs to try
-# if the first URI does not work.
+# if the first URI does not work. For supported URI syntaxes, read up
+# the manpage for git-clone(1).
 #
 # It can be overriden via env using ${PN}_LIVE_REPO variable.
 #





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-07-28 14:12 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-07-28 14:12 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/07/28 14:12:22

  Modified:             ChangeLog git-r3.eclass
  Log:
  Use ROOT=/ when checking for git features, bug #518374. Patch provided by Michael Haubenwallner.

Revision  Changes    Path
1.1326               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1326&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1326&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1325&r2=1.1326

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1325
retrieving revision 1.1326
diff -u -r1.1325 -r1.1326
--- ChangeLog	25 Jul 2014 23:18:34 -0000	1.1325
+++ ChangeLog	28 Jul 2014 14:12:22 -0000	1.1326
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1325 2014/07/25 23:18:34 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1326 2014/07/28 14:12:22 mgorny Exp $
+
+  28 Jul 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Use ROOT=/ when checking for git features, bug #518374. Patch provided by
+  Michael Haubenwallner.
 
   25 Jul 2014; Christoph Junghans <ottxor@gentoo.org> mercurial.eclass:
   Added EHG_CHECKOUT_DIR to override checkout destination



1.46                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.45&r2=1.46

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- git-r3.eclass	7 Jul 2014 14:41:56 -0000	1.45
+++ git-r3.eclass	28 Jul 2014 14:12:22 -0000	1.46
@@ -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.45 2014/07/07 14:41:56 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.46 2014/07/28 14:12:22 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -513,7 +513,7 @@
 		local fetch_command=( git fetch "${r}" )
 		local clone_type=${EGIT_CLONE_TYPE}
 
-		if [[ ${r} == https://* ]] && ! has_version 'dev-vcs/git[curl]'; then
+		if [[ ${r} == https://* ]] && ! ROOT=/ has_version 'dev-vcs/git[curl]'; then
 			eerror "git-r3: fetching from https:// requested. In order to support https,"
 			eerror "dev-vcs/git needs to be built with USE=curl. Example solution:"
 			eerror





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-07-07 14:41 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-07-07 14:41 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/07/07 14:41:56

  Modified:             ChangeLog git-r3.eclass
  Log:
  Stop forcing -m0755 on EGIT3_STORE_DIR and parents, bug #516508.

Revision  Changes    Path
1.1317               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1317&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1317&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1316&r2=1.1317

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1316
retrieving revision 1.1317
diff -u -r1.1316 -r1.1317
--- ChangeLog	7 Jul 2014 12:43:35 -0000	1.1316
+++ ChangeLog	7 Jul 2014 14:41:56 -0000	1.1317
@@ -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.1316 2014/07/07 12:43:35 haubi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1317 2014/07/07 14:41:56 mgorny Exp $
+
+  07 Jul 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Stop forcing -m0755 on EGIT3_STORE_DIR and parents, bug #516508.
 
   07 Jul 2014; Michael Haubenwallner <haubi@gentoo.org>
   ELT-patches/aixrtl/1.5.0-cmds-c, ELT-patches/aixrtl/1.5.0-cmds-cxx,



1.45                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.45&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.45&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.44&r2=1.45

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- git-r3.eclass	20 Jun 2014 11:40:28 -0000	1.44
+++ git-r3.eclass	7 Jul 2014 14:41:56 -0000	1.45
@@ -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.44 2014/06/20 11:40:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.45 2014/07/07 14:41:56 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -302,7 +302,7 @@
 	if [[ ! -d ${EGIT3_STORE_DIR} ]]; then
 		(
 			addwrite /
-			mkdir -m0755 -p "${EGIT3_STORE_DIR}" || die
+			mkdir -p "${EGIT3_STORE_DIR}" || die
 		) || die "Unable to create ${EGIT3_STORE_DIR}"
 	fi
 





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-06-20 11:40 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-06-20 11:40 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/06/20 11:40:28

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fix typo in submodule fetching, reported by Hans Vercammen.

Revision  Changes    Path
1.1296               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1296&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1296&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1295&r2=1.1296

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1295
retrieving revision 1.1296
diff -u -r1.1295 -r1.1296
--- ChangeLog	20 Jun 2014 00:03:33 -0000	1.1295
+++ ChangeLog	20 Jun 2014 11:40:28 -0000	1.1296
@@ -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.1295 2014/06/20 00:03:33 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1296 2014/06/20 11:40:28 mgorny Exp $
+
+  20 Jun 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Fix typo in submodule fetching, reported by Hans Vercammen.
 
   19 Jun 2014; Brian Evans <grknight@gentoo.org> mysql-v2.eclass, mysql-cmake.eclass:
   Sync with mysql overlay.



1.44                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.44&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.44&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.43&r2=1.44

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- git-r3.eclass	1 Jun 2014 22:07:59 -0000	1.43
+++ git-r3.eclass	20 Jun 2014 11:40:28 -0000	1.44
@@ -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.43 2014/06/01 22:07:59 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.44 2014/06/20 11:40:28 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -825,7 +825,7 @@
 			local subrepos
 			_git-r3_set_subrepos "${url}" "${repos[@]}"
 
-			git-r3_checkout "${url}" "${out_dir}/${path}" \
+			git-r3_checkout "${subrepos[*]}" "${out_dir}/${path}" \
 				"${local_id}/${subname}"
 
 			submodules=( "${submodules[@]:3}" ) # shift





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-05-23  7:09 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-05-23  7:09 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/05/23 07:09:08

  Modified:             ChangeLog git-r3.eclass
  Log:
  Give an explanatory error when trying to fetch https:// with dev-vcs/git[-curl]. Bug #510768.

Revision  Changes    Path
1.1265               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1265&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1265&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1264&r2=1.1265

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1264
retrieving revision 1.1265
diff -u -r1.1264 -r1.1265
--- ChangeLog	22 May 2014 16:35:11 -0000	1.1264
+++ ChangeLog	23 May 2014 07:09:07 -0000	1.1265
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1264 2014/05/22 16:35:11 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1265 2014/05/23 07:09:07 mgorny Exp $
+
+  23 May 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Give an explanatory error when trying to fetch https:// with
+  dev-vcs/git[-curl]. Bug #510768.
 
   22 May 2014; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass:
   cabal_chdeps() now defaults to MY_PN (autogenerated by hackport) if exists,



1.42                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.42&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.42&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.41&r2=1.42

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- git-r3.eclass	17 Apr 2014 20:28:37 -0000	1.41
+++ git-r3.eclass	23 May 2014 07:09:07 -0000	1.42
@@ -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.41 2014/04/17 20:28:37 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.42 2014/05/23 07:09:07 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -470,6 +470,15 @@
 		local fetch_command=( git fetch "${r}" )
 		local clone_type=${EGIT_CLONE_TYPE}
 
+		if [[ ${r} == https://* ]] && ! has_version 'dev-vcs/git[curl]'; then
+			eerror "git-r3: fetching from https:// requested. In order to support https,"
+			eerror "dev-vcs/git needs to be built with USE=curl. Example solution:"
+			eerror
+			eerror "	echo dev-vcs/git curl >> /etc/portage/package.use"
+			eerror "	emerge -1v dev-vcs/git"
+			die "dev-vcs/git built with USE=curl required."
+		fi
+
 		if [[ ${r} == https://code.google.com/* ]]; then
 			# Google Code has special magic on top of git that:
 			# 1) can't handle shallow clones at all,





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-04-17 20:28 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-04-17 20:28 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/04/17 20:28:37

  Modified:             ChangeLog git-r3.eclass
  Log:
  Automatically switch to EGIT_CLONE_TYPE=single+tags for Google Code.

Revision  Changes    Path
1.1212               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1212&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1212&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1211&r2=1.1212

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1211
retrieving revision 1.1212
diff -u -r1.1211 -r1.1212
--- ChangeLog	17 Apr 2014 18:16:54 -0000	1.1211
+++ ChangeLog	17 Apr 2014 20:28:37 -0000	1.1212
@@ -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.1211 2014/04/17 18:16:54 kensington Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1212 2014/04/17 20:28:37 mgorny Exp $
+
+  17 Apr 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Automatically switch to EGIT_CLONE_TYPE=single+tags for Google Code.
 
   17 Apr 2014; Michael Palimaka <kensington@gentoo.org> kde4-meta.eclass:
   Sync with overlay. Remove unused inherit. Switch to git-r3 eclass. Fix file



1.41                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.41&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.41&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.40&r2=1.41

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- git-r3.eclass	24 Mar 2014 21:32:31 -0000	1.40
+++ git-r3.eclass	17 Apr 2014 20:28:37 -0000	1.41
@@ -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.40 2014/03/24 21:32:31 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.41 2014/04/17 20:28:37 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -468,8 +468,25 @@
 		einfo "Fetching ${r} ..."
 
 		local fetch_command=( git fetch "${r}" )
+		local clone_type=${EGIT_CLONE_TYPE}
 
-		if [[ ${EGIT_CLONE_TYPE} == mirror ]]; then
+		if [[ ${r} == https://code.google.com/* ]]; then
+			# Google Code has special magic on top of git that:
+			# 1) can't handle shallow clones at all,
+			# 2) fetches duplicately when tags are pulled in with branch
+			# so automatically switch to single+tags mode.
+			if [[ ${clone_type} == shallow ]]; then
+				einfo "  Google Code does not support shallow clones"
+				einfo "  using EGIT_CLONE_TYPE=single+tags"
+				clone_type=single+tags
+			elif [[ ${clone_type} == single ]]; then
+				einfo "  git-r3: Google Code does not send tags properly in 'single' mode"
+				einfo "  using EGIT_CLONE_TYPE=single+tags"
+				clone_type=single+tags
+			fi
+		fi
+
+		if [[ ${clone_type} == mirror ]]; then
 			fetch_command+=(
 				--prune
 				# mirror the remote branches as local branches
@@ -510,8 +527,8 @@
 					fi
 
 					# fetching by commit in shallow mode? can't do.
-					if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
-						local EGIT_CLONE_TYPE=single
+					if [[ ${clone_type} == shallow ]]; then
+						clone_type=single
 					fi
 				fi
 			fi
@@ -526,7 +543,7 @@
 				"+${fetch_l}:${fetch_r}"
 			)
 
-			if [[ ${EGIT_CLONE_TYPE} == single+tags ]]; then
+			if [[ ${clone_type} == single+tags ]]; then
 				fetch_command+=(
 					# pull tags explicitly as requested
 					"+refs/tags/*:refs/tags/*"
@@ -534,11 +551,11 @@
 			fi
 		fi
 
-		if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
+		if [[ ${clone_type} == shallow ]]; then
 			if _git-r3_is_local_repo; then
 				# '--depth 1' causes sandbox violations with local repos
 				# bug #491260
-				local EGIT_CLONE_TYPE=single
+				clone_type=single
 			elif [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
 			then
 				# use '--depth 1' when fetching a new branch
@@ -553,7 +570,7 @@
 		set -- "${fetch_command[@]}"
 		echo "${@}" >&2
 		if "${@}"; then
-			if [[ ${EGIT_CLONE_TYPE} == mirror ]]; then
+			if [[ ${clone_type} == mirror ]]; then
 				# find remote HEAD and update our HEAD properly
 				git symbolic-ref HEAD \
 					"$(_git-r3_find_head refs/git-r3/HEAD \





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-24 21:32 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-24 21:32 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/24 21:32:31

  Modified:             ChangeLog git-r3.eclass
  Log:
  Add a single+tags mode to handle Google Code more efficiently, bug #503708.

Revision  Changes    Path
1.1183               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1183&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1183&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1182&r2=1.1183

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1182
retrieving revision 1.1183
diff -u -r1.1182 -r1.1183
--- ChangeLog	21 Mar 2014 22:03:00 -0000	1.1182
+++ ChangeLog	24 Mar 2014 21:32:31 -0000	1.1183
@@ -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.1182 2014/03/21 22:03:00 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1183 2014/03/24 21:32:31 mgorny Exp $
+
+  24 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Add a single+tags mode to handle Google Code more efficiently, bug #503708.
 
   21 Mar 2014; Robin H. Johnson <robbat2@gentoo.org> linux-info.eclass:
   linux-info: Bug #504346: Change one message from error to warning, kernel



1.40                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.40&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.40&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.39&r2=1.40

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- git-r3.eclass	3 Mar 2014 21:45:06 -0000	1.39
+++ git-r3.eclass	24 Mar 2014 21:32:31 -0000	1.40
@@ -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.39 2014/03/03 21:45:06 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.40 2014/03/24 21:32:31 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -47,6 +47,14 @@
 # for development or hosting a local git mirror. However, clones
 # of repositories with large diverged branches may quickly grow large.
 #
+# The 'single+tags' type clones the requested branch and all tags
+# in the repository. All notes are fetched as well. EGIT_COMMIT
+# can safely specify hashes throughout the current branch and all tags.
+# No purging of old references is done (if you often switch branches,
+# you may need to remove stale branches yourself). This mode is intended
+# mostly for use with broken git servers such as Google Code that fail
+# to fetch tags along with the branch in 'single' mode.
+#
 # The 'single' type clones only the requested branch or tag. Tags
 # referencing commits throughout the branch history are fetched as well,
 # and all notes. EGIT_COMMIT can safely specify only hashes
@@ -72,9 +80,10 @@
 # supposed to set EGIT_CLONE_TYPE instead.
 #
 # A common case is to use 'single' whenever the build system requires
-# access to full branch history or the remote (Google Code) does not
-# support shallow clones. Please use sparingly, and to fix fatal errors
-# rather than 'non-pretty versions'.
+# access to full branch history, or 'single+tags' when Google Code
+# or a similar remote is used that does not support shallow clones
+# and fetching tags along with commits. Please use sparingly, and to fix
+# fatal errors rather than 'non-pretty versions'.
 : ${EGIT_MIN_CLONE_TYPE:=shallow}
 
 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
@@ -154,7 +163,7 @@
 
 	# check the clone type
 	case "${EGIT_CLONE_TYPE}" in
-		mirror|single|shallow)
+		mirror|single+tags|single|shallow)
 			;;
 		*)
 			die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
@@ -168,6 +177,12 @@
 				EGIT_CLONE_TYPE=single
 			fi
 			;;
+		single+tags)
+			if [[ ${EGIT_CLONE_TYPE} == shallow || ${EGIT_CLONE_TYPE} == single ]]; then
+				einfo "git-r3: ebuild needs to be cloned in 'single+tags' mode, adjusting"
+				EGIT_CLONE_TYPE=single+tags
+			fi
+			;;
 		mirror)
 			if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
 				einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting"
@@ -510,6 +525,13 @@
 			fetch_command+=(
 				"+${fetch_l}:${fetch_r}"
 			)
+
+			if [[ ${EGIT_CLONE_TYPE} == single+tags ]]; then
+				fetch_command+=(
+					# pull tags explicitly as requested
+					"+refs/tags/*:refs/tags/*"
+				)
+			fi
 		fi
 
 		if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-03 21:45 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-03 21:45 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/03 21:45:06

  Modified:             ChangeLog git-r3.eclass
  Log:
  Force EGIT_CLONE_TYPE=mirror for submodules since they can reference commits in any branch without explicitly naming the branch, bug #503332.

Revision  Changes    Path
1.1165               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1165&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1165&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1164&r2=1.1165

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1164
retrieving revision 1.1165
diff -u -r1.1164 -r1.1165
--- ChangeLog	2 Mar 2014 15:41:20 -0000	1.1164
+++ ChangeLog	3 Mar 2014 21:45:06 -0000	1.1165
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1164 2014/03/02 15:41:20 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1165 2014/03/03 21:45:06 mgorny Exp $
+
+  03 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Force EGIT_CLONE_TYPE=mirror for submodules since they can reference commits
+  in any branch without explicitly naming the branch, bug #503332.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> xorg-2.eclass:
   Use git-r3 for live ebuilds.



1.39                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.38&r2=1.39

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- git-r3.eclass	2 Mar 2014 11:50:48 -0000	1.38
+++ git-r3.eclass	3 Mar 2014 21:45:06 -0000	1.39
@@ -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.38 2014/03/02 11:50:48 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.39 2014/03/03 21:45:06 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -578,6 +578,10 @@
 	done
 	[[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"
 
+	# submodules can reference commits in any branch
+	# always use the 'clone' mode to accomodate that, bug #503332
+	local EGIT_CLONE_TYPE=mirror
+
 	# recursively fetch submodules
 	if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then
 		local submodules





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:50 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:50 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:50:48

  Modified:             ChangeLog git-r3.eclass
  Log:
  Clarify where EGIT_CLONE_TYPE and EGIT_MIN_CLONE_TYPE is supposed to be set.

Revision  Changes    Path
1.1163               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1163&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1163&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1162&r2=1.1163

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1162
retrieving revision 1.1163
diff -u -r1.1162 -r1.1163
--- ChangeLog	2 Mar 2014 11:50:23 -0000	1.1162
+++ ChangeLog	2 Mar 2014 11:50:48 -0000	1.1163
@@ -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.1162 2014/03/02 11:50:23 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1163 2014/03/02 11:50:48 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Clarify where EGIT_CLONE_TYPE and EGIT_MIN_CLONE_TYPE is supposed to be set.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Do not try shallow clones on local repositories.



1.38                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.37&r2=1.38

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- git-r3.eclass	2 Mar 2014 11:50:23 -0000	1.37
+++ git-r3.eclass	2 Mar 2014 11:50:48 -0000	1.38
@@ -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.37 2014/03/02 11:50:23 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.38 2014/03/02 11:50:48 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -37,6 +37,9 @@
 # Type of clone that should be used against the remote repository.
 # This can be either of: 'mirror', 'single', 'shallow'.
 #
+# This is intended to be set by user in make.conf. Ebuilds are supposed
+# to set EGIT_MIN_CLONE_TYPE if necessary instead.
+#
 # The 'mirror' type clones all remote branches and tags with complete
 # history and all notes. EGIT_COMMIT can specify any commit hash.
 # Upstream-removed branches and tags are purged from the local clone
@@ -65,6 +68,9 @@
 # later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses
 # EGIT_MIN_CLONE_TYPE instead.
 #
+# This variable is intended to be used by ebuilds only. Users are
+# supposed to set EGIT_CLONE_TYPE instead.
+#
 # A common case is to use 'single' whenever the build system requires
 # access to full branch history or the remote (Google Code) does not
 # support shallow clones. Please use sparingly, and to fix fatal errors





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:50 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:50 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:50:23

  Modified:             ChangeLog git-r3.eclass
  Log:
  Do not try shallow clones on local repositories.

Revision  Changes    Path
1.1162               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1162&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1162&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1161&r2=1.1162

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1161
retrieving revision 1.1162
diff -u -r1.1161 -r1.1162
--- ChangeLog	2 Mar 2014 11:49:49 -0000	1.1161
+++ ChangeLog	2 Mar 2014 11:50:23 -0000	1.1162
@@ -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.



1.37                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.37&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.37&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.36&r2=1.37

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- git-r3.eclass	2 Mar 2014 11:49:49 -0000	1.36
+++ git-r3.eclass	2 Mar 2014 11:50:23 -0000	1.37
@@ -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 @@
 		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





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:49 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:49 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:49:49

  Modified:             ChangeLog git-r3.eclass
  Log:
  Force non-forward updates on git refs.

Revision  Changes    Path
1.1161               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1161&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1161&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1160&r2=1.1161

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1160
retrieving revision 1.1161
diff -u -r1.1160 -r1.1161
--- ChangeLog	2 Mar 2014 11:49:05 -0000	1.1160
+++ ChangeLog	2 Mar 2014 11:49:49 -0000	1.1161
@@ -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.1160 2014/03/02 11:49:05 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1161 2014/03/02 11:49:49 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Force non-forward updates on git refs.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Add EGIT_MIN_CLONE_TYPE to control clone type via ebuilds.



1.36                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.35&r2=1.36

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- git-r3.eclass	2 Mar 2014 11:49:05 -0000	1.35
+++ git-r3.eclass	2 Mar 2014 11:49:49 -0000	1.36
@@ -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.35 2014/03/02 11:49:05 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.36 2014/03/02 11:49:49 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -452,14 +452,14 @@
 			fetch_command+=(
 				--prune
 				# mirror the remote branches as local branches
-				"refs/heads/*:refs/heads/*"
+				"+refs/heads/*:refs/heads/*"
 				# pull tags explicitly in order to prune them properly
-				"refs/tags/*:refs/tags/*"
+				"+refs/tags/*:refs/tags/*"
 				# notes in case something needs them
-				"refs/notes/*:refs/notes/*"
+				"+refs/notes/*:refs/notes/*"
 				# and HEAD in case we need the default branch
 				# (we keep it in refs/git-r3 since otherwise --prune interferes)
-				HEAD:refs/git-r3/HEAD
+				"+HEAD:refs/git-r3/HEAD"
 			)
 		else # single or shallow
 			local fetch_l fetch_r
@@ -502,7 +502,7 @@
 			fi
 
 			fetch_command+=(
-				"${fetch_l}:${fetch_r}"
+				"+${fetch_l}:${fetch_r}"
 			)
 		fi
 





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:49 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:49 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:49:05

  Modified:             ChangeLog git-r3.eclass
  Log:
  Add EGIT_MIN_CLONE_TYPE to control clone type via ebuilds.

Revision  Changes    Path
1.1160               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1160&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1160&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1159&r2=1.1160

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1159
retrieving revision 1.1160
diff -u -r1.1159 -r1.1160
--- ChangeLog	2 Mar 2014 11:48:28 -0000	1.1159
+++ ChangeLog	2 Mar 2014 11:49:05 -0000	1.1160
@@ -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.1159 2014/03/02 11:48:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1160 2014/03/02 11:49:05 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Add EGIT_MIN_CLONE_TYPE to control clone type via ebuilds.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Auto-unshallow when fetching by commit hash.



1.35                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.34&r2=1.35

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- git-r3.eclass	2 Mar 2014 11:48:28 -0000	1.34
+++ git-r3.eclass	2 Mar 2014 11:49:05 -0000	1.35
@@ -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.34 2014/03/02 11:48:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.35 2014/03/02 11:49:05 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -58,6 +58,19 @@
 # embedded systems with limited disk space.
 : ${EGIT_CLONE_TYPE:=single}
 
+# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE
+# @DESCRIPTION:
+# 'Minimum' clone type supported by the ebuild. Takes same values
+# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is,
+# later on the list) than EGIT_MIN_CLONE_TYPE, the eclass uses
+# EGIT_MIN_CLONE_TYPE instead.
+#
+# A common case is to use 'single' whenever the build system requires
+# access to full branch history or the remote (Google Code) does not
+# support shallow clones. Please use sparingly, and to fix fatal errors
+# rather than 'non-pretty versions'.
+: ${EGIT_MIN_CLONE_TYPE:=shallow}
+
 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
 # @DESCRIPTION:
 # Storage directory for git sources.
@@ -140,6 +153,24 @@
 		*)
 			die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
 	esac
+	case "${EGIT_MIN_CLONE_TYPE}" in
+		shallow)
+			;;
+		single)
+			if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
+				einfo "git-r3: ebuild needs to be cloned in 'single' mode, adjusting"
+				EGIT_CLONE_TYPE=single
+			fi
+			;;
+		mirror)
+			if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
+				einfo "git-r3: ebuild needs to be cloned in 'mirror' mode, adjusting"
+				EGIT_CLONE_TYPE=mirror
+			fi
+			;;
+		*)
+			die "Invalid EGIT_MIN_CLONE_TYPE=${EGIT_MIN_CLONE_TYPE}"
+	esac
 
 	local esc_pn livevar
 	esc_pn=${PN//[-+]/_}





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:48 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:48 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:48:28

  Modified:             ChangeLog git-r3.eclass
  Log:
  Auto-unshallow when fetching by commit hash.

Revision  Changes    Path
1.1159               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1159&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1159&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1158&r2=1.1159

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1158
retrieving revision 1.1159
diff -u -r1.1158 -r1.1159
--- ChangeLog	2 Mar 2014 11:48:05 -0000	1.1158
+++ ChangeLog	2 Mar 2014 11:48:28 -0000	1.1159
@@ -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.



1.34                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.33&r2=1.34

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- git-r3.eclass	2 Mar 2014 11:48:05 -0000	1.33
+++ git-r3.eclass	2 Mar 2014 11:48:28 -0000	1.34
@@ -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 @@
 					# 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
 





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:48 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:48 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:48:05

  Modified:             ChangeLog git-r3.eclass
  Log:
  Support EGIT_CLONE_TYPE=shallow.

Revision  Changes    Path
1.1158               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1158&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1158&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1157&r2=1.1158

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1157
retrieving revision 1.1158
diff -u -r1.1157 -r1.1158
--- ChangeLog	2 Mar 2014 11:47:41 -0000	1.1157
+++ ChangeLog	2 Mar 2014 11:48:05 -0000	1.1158
@@ -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.1157 2014/03/02 11:47:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1158 2014/03/02 11:48:05 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Support EGIT_CLONE_TYPE=shallow.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Support EGIT_CLONE_TYPE=single.



1.33                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.32&r2=1.33

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- git-r3.eclass	2 Mar 2014 11:47:41 -0000	1.32
+++ git-r3.eclass	2 Mar 2014 11:48:05 -0000	1.33
@@ -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.32 2014/03/02 11:47:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.33 2014/03/02 11:48:05 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -29,13 +29,13 @@
 if [[ ! ${_GIT_R3} ]]; then
 
 if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
-	DEPEND="dev-vcs/git"
+	DEPEND=">=dev-vcs/git-1.8.2.1"
 fi
 
 # @ECLASS-VARIABLE: EGIT_CLONE_TYPE
 # @DESCRIPTION:
 # Type of clone that should be used against the remote repository.
-# This can be either of: 'mirror', 'single'.
+# This can be either of: 'mirror', 'single', 'shallow'.
 #
 # The 'mirror' type clones all remote branches and tags with complete
 # history and all notes. EGIT_COMMIT can specify any commit hash.
@@ -50,6 +50,12 @@
 # in the current branch. No purging of old references is done (if you
 # often switch branches, you may need to remove stale branches
 # yourself). This mode is suitable for general use.
+#
+# The 'shallow' type clones only the newest commit on requested branch
+# or tag. EGIT_COMMIT can only specify tags, and since the history is
+# unavailable calls like 'git describe' will not reference prior tags.
+# No purging of old references is done. This mode is intended mostly for
+# embedded systems with limited disk space.
 : ${EGIT_CLONE_TYPE:=single}
 
 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
@@ -129,7 +135,7 @@
 
 	# check the clone type
 	case "${EGIT_CLONE_TYPE}" in
-		mirror|single)
+		mirror|single|shallow)
 			;;
 		*)
 			die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
@@ -249,10 +255,6 @@
 	fi
 
 	addwrite "${EGIT3_STORE_DIR}"
-	if [[ -e ${GIT_DIR}/shallow ]]; then
-		einfo "${GIT_DIR} was a shallow clone, recreating..."
-		rm -r "${GIT_DIR}" || die
-	fi
 	if [[ ! -d ${GIT_DIR} ]]; then
 		mkdir "${GIT_DIR}" || die
 		git init --bare || die
@@ -428,7 +430,7 @@
 				# (we keep it in refs/git-r3 since otherwise --prune interferes)
 				HEAD:refs/git-r3/HEAD
 			)
-		else # single
+		else # single or shallow
 			local fetch_l fetch_r
 
 			if [[ ${remote_ref} == HEAD ]]; then
@@ -468,6 +470,18 @@
 			)
 		fi
 
+		if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
+			# use '--depth 1' when fetching a new branch
+			if [[ ! $(git rev-parse --quiet --verify "${fetch_r}") ]]
+			then
+				fetch_command+=( --depth 1 )
+			fi
+		else # non-shallow mode
+			if [[ -f ${GIT_DIR}/shallow ]]; then
+				fetch_command+=( --unshallow )
+			fi
+		fi
+
 		set -- "${fetch_command[@]}"
 		echo "${@}" >&2
 		if "${@}"; then
@@ -477,7 +491,7 @@
 					"$(_git-r3_find_head refs/git-r3/HEAD \
 						< <(git show-ref --heads || die))" \
 						|| die "Unable to update HEAD"
-			else # single
+			else # single or shallow
 				if [[ ${fetch_l} == HEAD ]]; then
 					# find out what branch we fetched as HEAD
 					local head_branch=$(_git-r3_find_head \
@@ -620,6 +634,10 @@
 
 		# (no need to copy HEAD, we will set it via checkout)
 
+		if [[ -f ${orig_repo}/shallow ]]; then
+			cp "${orig_repo}"/shallow "${GIT_DIR}"/ || die
+		fi
+
 		set -- git checkout --quiet
 		if [[ ${remote_ref} ]]; then
 			set -- "${@}" "${remote_ref#refs/heads/}"





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:47 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:47 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:47:42

  Modified:             ChangeLog git-r3.eclass
  Log:
  Support EGIT_CLONE_TYPE=single.

Revision  Changes    Path
1.1157               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1157&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1157&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1156&r2=1.1157

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1156
retrieving revision 1.1157
diff -u -r1.1156 -r1.1157
--- ChangeLog	2 Mar 2014 11:47:10 -0000	1.1156
+++ ChangeLog	2 Mar 2014 11:47:41 -0000	1.1157
@@ -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.1156 2014/03/02 11:47:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1157 2014/03/02 11:47:41 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Support EGIT_CLONE_TYPE=single.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Introduce EGIT_CLONE_TYPE for future use.



1.32                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.31&r2=1.32

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- git-r3.eclass	2 Mar 2014 11:47:10 -0000	1.31
+++ git-r3.eclass	2 Mar 2014 11:47:41 -0000	1.32
@@ -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.31 2014/03/02 11:47:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.32 2014/03/02 11:47:41 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -35,7 +35,7 @@
 # @ECLASS-VARIABLE: EGIT_CLONE_TYPE
 # @DESCRIPTION:
 # Type of clone that should be used against the remote repository.
-# This can be either of: 'mirror'.
+# This can be either of: 'mirror', 'single'.
 #
 # The 'mirror' type clones all remote branches and tags with complete
 # history and all notes. EGIT_COMMIT can specify any commit hash.
@@ -43,7 +43,14 @@
 # while fetching. This mode is suitable for cloning the local copy
 # for development or hosting a local git mirror. However, clones
 # of repositories with large diverged branches may quickly grow large.
-: ${EGIT_CLONE_TYPE:=mirror}
+#
+# The 'single' type clones only the requested branch or tag. Tags
+# referencing commits throughout the branch history are fetched as well,
+# and all notes. EGIT_COMMIT can safely specify only hashes
+# in the current branch. No purging of old references is done (if you
+# often switch branches, you may need to remove stale branches
+# yourself). This mode is suitable for general use.
+: ${EGIT_CLONE_TYPE:=single}
 
 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
 # @DESCRIPTION:
@@ -122,7 +129,7 @@
 
 	# check the clone type
 	case "${EGIT_CLONE_TYPE}" in
-		mirror)
+		mirror|single)
 			;;
 		*)
 			die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
@@ -305,14 +312,14 @@
 	[[ ${uri} == file://* || ${uri} == /* ]]
 }
 
-# @FUNCTION: _git-r3_update_head
-# @USAGE: <remote-head-ref>
+# @FUNCTION: _git-r3_find_head
+# @USAGE: <head-ref>
 # @INTERNAL
 # @DESCRIPTION:
-# Given a ref to which remote HEAD was fetched, try to match
-# a local branch and update symbolic HEAD appropriately.
-_git-r3_update_head()
-{
+# Given a ref to which remote HEAD was fetched, try to find
+# a branch matching the commit. Expects 'git show-ref'
+# or 'git ls-remote' output on stdin.
+_git-r3_find_head() {
 	debug-print-function ${FUNCNAME} "$@"
 
 	local head_ref=${1}
@@ -332,13 +339,13 @@
 				matching_ref=${ref}
 			fi
 		fi
-	done < <(git show-ref --heads || die)
+	done
 
 	if [[ ! ${matching_ref} ]]; then
 		die "Unable to find a matching branch for remote HEAD (${head_hash})"
 	fi
 
-	git symbolic-ref HEAD "${matching_ref}" || die
+	echo "${matching_ref}"
 }
 
 # @FUNCTION: git-r3_fetch
@@ -406,24 +413,85 @@
 	for r in "${repos[@]}"; do
 		einfo "Fetching ${r} ..."
 
-		local fetch_command=(
-			git fetch --prune "${r}"
-			# mirror the remote branches as local branches
-			"refs/heads/*:refs/heads/*"
-			# pull tags explicitly in order to prune them properly
-			"refs/tags/*:refs/tags/*"
-			# notes in case something needs them
-			"refs/notes/*:refs/notes/*"
-			# and HEAD in case we need the default branch
-			# (we keep it in refs/git-r3 since otherwise --prune interferes)
-			HEAD:refs/git-r3/HEAD
-		)
+		local fetch_command=( git fetch "${r}" )
+
+		if [[ ${EGIT_CLONE_TYPE} == mirror ]]; then
+			fetch_command+=(
+				--prune
+				# mirror the remote branches as local branches
+				"refs/heads/*:refs/heads/*"
+				# pull tags explicitly in order to prune them properly
+				"refs/tags/*:refs/tags/*"
+				# notes in case something needs them
+				"refs/notes/*:refs/notes/*"
+				# and HEAD in case we need the default branch
+				# (we keep it in refs/git-r3 since otherwise --prune interferes)
+				HEAD:refs/git-r3/HEAD
+			)
+		else # single
+			local fetch_l fetch_r
+
+			if [[ ${remote_ref} == HEAD ]]; then
+				# HEAD
+				fetch_l=HEAD
+			elif [[ ${remote_ref} == refs/heads/* ]]; then
+				# regular branch
+				fetch_l=${remote_ref}
+			else
+				# tag or commit...
+				# let ls-remote figure it out
+				local tagref=$(git ls-remote "${r}" "refs/tags/${remote_ref}")
+
+				# if it was a tag, ls-remote obtained a hash
+				if [[ ${tagref} ]]; then
+					# tag
+					fetch_l=refs/tags/${remote_ref}
+				else
+					# commit, so we need to fetch the branch
+					# and guess where it takes us...
+					if [[ ${branch} ]]; then
+						fetch_l=${branch}
+					else
+						fetch_l=HEAD
+					fi
+				fi
+			fi
+
+			if [[ ${fetch_l} == HEAD ]]; then
+				fetch_r=refs/git-r3/HEAD
+			else
+				fetch_r=${fetch_l}
+			fi
+
+			fetch_command+=(
+				"${fetch_l}:${fetch_r}"
+			)
+		fi
 
 		set -- "${fetch_command[@]}"
 		echo "${@}" >&2
 		if "${@}"; then
-			# find remote HEAD and update our HEAD properly
-			_git-r3_update_head refs/git-r3/HEAD
+			if [[ ${EGIT_CLONE_TYPE} == mirror ]]; then
+				# find remote HEAD and update our HEAD properly
+				git symbolic-ref HEAD \
+					"$(_git-r3_find_head refs/git-r3/HEAD \
+						< <(git show-ref --heads || die))" \
+						|| die "Unable to update HEAD"
+			else # single
+				if [[ ${fetch_l} == HEAD ]]; then
+					# find out what branch we fetched as HEAD
+					local head_branch=$(_git-r3_find_head \
+						refs/git-r3/HEAD \
+						< <(git ls-remote --heads "${r}" || die))
+
+					# and move it to its regular place
+					git update-ref --no-deref "${head_branch}" \
+						refs/git-r3/HEAD \
+						|| die "Unable to sync HEAD branch ${head_branch}"
+					git symbolic-ref HEAD "${head_branch}" \
+						|| die "Unable to update HEAD"
+				fi
+			fi
 
 			# now let's see what the user wants from us
 			local full_remote_ref=$(





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:47 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:47 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:47:10

  Modified:             ChangeLog git-r3.eclass
  Log:
  Introduce EGIT_CLONE_TYPE for future use.

Revision  Changes    Path
1.1156               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1156&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1156&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1155&r2=1.1156

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1155
retrieving revision 1.1156
diff -u -r1.1155 -r1.1156
--- ChangeLog	2 Mar 2014 11:46:42 -0000	1.1155
+++ ChangeLog	2 Mar 2014 11:47:10 -0000	1.1156
@@ -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.1155 2014/03/02 11:46:42 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1156 2014/03/02 11:47:10 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Introduce EGIT_CLONE_TYPE for future use.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Support using a local git mirror.



1.31                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.30&r2=1.31

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- git-r3.eclass	2 Mar 2014 11:46:42 -0000	1.30
+++ git-r3.eclass	2 Mar 2014 11:47:10 -0000	1.31
@@ -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.30 2014/03/02 11:46:42 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.31 2014/03/02 11:47:10 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -32,6 +32,19 @@
 	DEPEND="dev-vcs/git"
 fi
 
+# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
+# @DESCRIPTION:
+# Type of clone that should be used against the remote repository.
+# This can be either of: 'mirror'.
+#
+# The 'mirror' type clones all remote branches and tags with complete
+# history and all notes. EGIT_COMMIT can specify any commit hash.
+# Upstream-removed branches and tags are purged from the local clone
+# while fetching. This mode is suitable for cloning the local copy
+# for development or hosting a local git mirror. However, clones
+# of repositories with large diverged branches may quickly grow large.
+: ${EGIT_CLONE_TYPE:=mirror}
+
 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
 # @DESCRIPTION:
 # Storage directory for git sources.
@@ -107,6 +120,14 @@
 _git-r3_env_setup() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	# check the clone type
+	case "${EGIT_CLONE_TYPE}" in
+		mirror)
+			;;
+		*)
+			die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
+	esac
+
 	local esc_pn livevar
 	esc_pn=${PN//[-+]/_}
 





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:46 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:46 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:46:42

  Modified:             ChangeLog git-r3.eclass
  Log:
  Support using a local git mirror.

Revision  Changes    Path
1.1155               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1155&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1155&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1154&r2=1.1155

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1154
retrieving revision 1.1155
diff -u -r1.1154 -r1.1155
--- ChangeLog	2 Mar 2014 11:46:15 -0000	1.1154
+++ ChangeLog	2 Mar 2014 11:46:42 -0000	1.1155
@@ -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.1154 2014/03/02 11:46:15 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1155 2014/03/02 11:46:42 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Support using a local git mirror.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Fix support for non-master default branch.



1.30                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.29&r2=1.30

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- git-r3.eclass	2 Mar 2014 11:46:15 -0000	1.29
+++ git-r3.eclass	2 Mar 2014 11:46:42 -0000	1.30
@@ -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.29 2014/03/02 11:46:15 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.30 2014/03/02 11:46:42 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -41,6 +41,20 @@
 #
 # EGIT3_STORE_DIR=${DISTDIR}/git3-src
 
+# @ECLASS-VARIABLE: EGIT_MIRROR_URI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# 'Top' URI to a local git mirror. If specified, the eclass will try
+# to fetch from the local mirror instead of using the remote repository.
+#
+# The mirror needs to follow EGIT3_STORE_DIR structure. The directory
+# created by eclass can be used for that purpose.
+#
+# Example:
+# @CODE
+# EGIT_MIRROR_URI="git://mirror.lan/"
+# @CODE
+
 # @ECLASS-VARIABLE: EGIT_REPO_URI
 # @REQUIRED
 # @DESCRIPTION:
@@ -358,6 +372,14 @@
 	local -x GIT_DIR
 	_git-r3_set_gitdir "${repos[0]}"
 
+	# prepend the local mirror if applicable
+	if [[ ${EGIT_MIRROR_URI} ]]; then
+		repos=(
+			"${EGIT_MIRROR_URI%/}/${GIT_DIR##*/}"
+			"${repos[@]}"
+		)
+	fi
+
 	# try to fetch from the remote
 	local r success
 	for r in "${repos[@]}"; do





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:46 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:46 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:46:15

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fix support for non-master default branch.

Revision  Changes    Path
1.1154               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1154&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1154&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1153&r2=1.1154

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1153
retrieving revision 1.1154
diff -u -r1.1153 -r1.1154
--- ChangeLog	2 Mar 2014 11:45:41 -0000	1.1153
+++ ChangeLog	2 Mar 2014 11:46:15 -0000	1.1154
@@ -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.1153 2014/03/02 11:45:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1154 2014/03/02 11:46:15 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Fix support for non-master default branch.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Replace "git fetch" checkout with more efficient and compatible pseudo-shared



1.29                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.28&r2=1.29

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- git-r3.eclass	2 Mar 2014 11:45:41 -0000	1.28
+++ git-r3.eclass	2 Mar 2014 11:46:15 -0000	1.29
@@ -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.28 2014/03/02 11:45:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.29 2014/03/02 11:46:15 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -270,6 +270,42 @@
 	[[ ${uri} == file://* || ${uri} == /* ]]
 }
 
+# @FUNCTION: _git-r3_update_head
+# @USAGE: <remote-head-ref>
+# @INTERNAL
+# @DESCRIPTION:
+# Given a ref to which remote HEAD was fetched, try to match
+# a local branch and update symbolic HEAD appropriately.
+_git-r3_update_head()
+{
+	debug-print-function ${FUNCNAME} "$@"
+
+	local head_ref=${1}
+	local head_hash=$(git rev-parse --verify "${1}" || die)
+	local matching_ref
+
+	# TODO: some transports support peeking at symbolic remote refs
+	# find a way to use that rather than guessing
+
+	# (based on guess_remote_head() in git-1.9.0/remote.c)
+	local h ref
+	while read h ref; do
+		# look for matching head
+		if [[ ${h} == ${head_hash} ]]; then
+			# either take the first matching ref, or master if it is there
+			if [[ ! ${matching_ref} || ${ref} == refs/heads/master ]]; then
+				matching_ref=${ref}
+			fi
+		fi
+	done < <(git show-ref --heads || die)
+
+	if [[ ! ${matching_ref} ]]; then
+		die "Unable to find a matching branch for remote HEAD (${head_hash})"
+	fi
+
+	git symbolic-ref HEAD "${matching_ref}" || die
+}
+
 # @FUNCTION: git-r3_fetch
 # @USAGE: [<repo-uri> [<remote-ref> [<local-id>]]]
 # @DESCRIPTION:
@@ -335,11 +371,17 @@
 			"refs/tags/*:refs/tags/*"
 			# notes in case something needs them
 			"refs/notes/*:refs/notes/*"
+			# and HEAD in case we need the default branch
+			# (we keep it in refs/git-r3 since otherwise --prune interferes)
+			HEAD:refs/git-r3/HEAD
 		)
 
 		set -- "${fetch_command[@]}"
 		echo "${@}" >&2
 		if "${@}"; then
+			# find remote HEAD and update our HEAD properly
+			_git-r3_update_head refs/git-r3/HEAD
+
 			# now let's see what the user wants from us
 			local full_remote_ref=$(
 				git rev-parse --verify --symbolic-full-name "${remote_ref}"





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:45 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:45 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:45:41

  Modified:             ChangeLog git-r3.eclass
  Log:
  Replace "git fetch" checkout with more efficient and compatible pseudo-shared clone.

Revision  Changes    Path
1.1153               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1153&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1153&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1152&r2=1.1153

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1152
retrieving revision 1.1153
diff -u -r1.1152 -r1.1153
--- ChangeLog	2 Mar 2014 11:44:19 -0000	1.1152
+++ ChangeLog	2 Mar 2014 11:45:41 -0000	1.1153
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1152 2014/03/02 11:44:19 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1153 2014/03/02 11:45:41 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Replace "git fetch" checkout with more efficient and compatible pseudo-shared
+  clone.
 
   02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Improve docs.



1.28                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.27&r2=1.28

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- git-r3.eclass	2 Mar 2014 11:44:19 -0000	1.27
+++ git-r3.eclass	2 Mar 2014 11:45:41 -0000	1.28
@@ -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.27 2014/03/02 11:44:19 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.28 2014/03/02 11:45:41 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -458,13 +458,14 @@
 		# non-empty directories.
 
 		git init --quiet || die
-		set -- git fetch --update-head-ok "${orig_repo}" \
-			"refs/heads/*:refs/heads/*" \
-			"refs/tags/*:refs/tags/*" \
-			"refs/notes/*:refs/notes/*"
+		# setup 'alternates' to avoid copying objects
+		echo "${orig_repo}/objects" > "${GIT_DIR}"/objects/info/alternates || die
+		# now copy the refs
+		# [htn]* safely catches heads, tags, notes without complaining
+		# on non-existing ones, and omits internal 'git-r3' ref
+		cp -R "${orig_repo}"/refs/[htn]* "${GIT_DIR}"/refs/ || die
 
-		echo "${@}" >&2
-		"${@}" || die "git fetch into checkout dir failed"
+		# (no need to copy HEAD, we will set it via checkout)
 
 		set -- git checkout --quiet
 		if [[ ${remote_ref} ]]; then





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-03-02 11:44 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-03-02 11:44 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/03/02 11:44:19

  Modified:             ChangeLog git-r3.eclass
  Log:
  Improve docs.

Revision  Changes    Path
1.1152               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1152&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1152&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1151&r2=1.1152

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1151
retrieving revision 1.1152
diff -u -r1.1151 -r1.1152
--- ChangeLog	1 Mar 2014 11:51:08 -0000	1.1151
+++ ChangeLog	2 Mar 2014 11:44:19 -0000	1.1152
@@ -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.1151 2014/03/01 11:51:08 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1152 2014/03/02 11:44:19 mgorny Exp $
+
+  02 Mar 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Improve docs.
 
   01 Mar 2014; Sergei Trofimovich <slyfox@gentoo.org> autotools.eclass:
   Call 'automake' via 'autotools_run_tool' (found by 'ebuild.sh' QA warnings).



1.27                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.26&r2=1.27

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- git-r3.eclass	25 Feb 2014 13:01:49 -0000	1.26
+++ git-r3.eclass	2 Mar 2014 11:44:19 -0000	1.27
@@ -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.26 2014/02/25 13:01:49 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.27 2014/03/02 11:44:19 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -36,6 +36,9 @@
 # @DESCRIPTION:
 # Storage directory for git sources.
 #
+# This is intended to be set by user in make.conf. Ebuilds must not set
+# it.
+#
 # EGIT3_STORE_DIR=${DISTDIR}/git3-src
 
 # @ECLASS-VARIABLE: EGIT_REPO_URI





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-02-25 13:01 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-02-25 13:01 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/02/25 13:01:49

  Modified:             ChangeLog git-r3.eclass
  Log:
  Use git init+fetch rather than clone in order to fix checking out to non-empty directory. Fixes bug #502400.

Revision  Changes    Path
1.1148               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1148&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1148&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1147&r2=1.1148

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1147
retrieving revision 1.1148
diff -u -r1.1147 -r1.1148
--- ChangeLog	24 Feb 2014 08:43:34 -0000	1.1147
+++ ChangeLog	25 Feb 2014 13:01:49 -0000	1.1148
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1147 2014/02/24 08:43:34 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1148 2014/02/25 13:01:49 mgorny Exp $
+
+  25 Feb 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Use git init+fetch rather than clone in order to fix checking out to
+  non-empty directory. Fixes bug #502400.
 
   24 Feb 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Fetch and preserve git notes as well.



1.26                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.25&r2=1.26

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- git-r3.eclass	24 Feb 2014 08:43:34 -0000	1.25
+++ git-r3.eclass	25 Feb 2014 13:01:49 -0000	1.26
@@ -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.25 2014/02/24 08:43:34 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.26 2014/02/25 13:01:49 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -444,17 +444,24 @@
 		git rev-parse --verify refs/git-r3/"${local_id}"/__main__
 	)
 
-	set -- git clone --quiet --shared --no-checkout "${GIT_DIR}" "${out_dir}"/
-	echo "${@}" >&2
-	"${@}" || die "git clone (for checkout) failed"
-
 	git-r3_sub_checkout() {
 		local orig_repo=${GIT_DIR}
 		local -x GIT_DIR=${out_dir}/.git
 		local -x GIT_WORK_TREE=${out_dir}
 
-		# pull notes
-		git fetch "${orig_repo}" "refs/notes/*:refs/notes/*" || die
+		mkdir -p "${out_dir}" || die
+
+		# use git init+fetch instead of clone since the latter doesn't like
+		# non-empty directories.
+
+		git init --quiet || die
+		set -- git fetch --update-head-ok "${orig_repo}" \
+			"refs/heads/*:refs/heads/*" \
+			"refs/tags/*:refs/tags/*" \
+			"refs/notes/*:refs/notes/*"
+
+		echo "${@}" >&2
+		"${@}" || die "git fetch into checkout dir failed"
 
 		set -- git checkout --quiet
 		if [[ ${remote_ref} ]]; then





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-02-24  8:43 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-02-24  8:43 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/02/24 08:43:34

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fetch and preserve git notes as well.

Revision  Changes    Path
1.1147               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1147&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1147&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1146&r2=1.1147

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1146
retrieving revision 1.1147
diff -u -r1.1146 -r1.1147
--- ChangeLog	23 Feb 2014 22:05:55 -0000	1.1146
+++ ChangeLog	24 Feb 2014 08:43:34 -0000	1.1147
@@ -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.1146 2014/02/23 22:05:55 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1147 2014/02/24 08:43:34 mgorny Exp $
+
+  24 Feb 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Fetch and preserve git notes as well.
 
   23 Feb 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Use complete git clones, and clone them onto the checkout directory. This



1.25                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.24&r2=1.25

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- git-r3.eclass	23 Feb 2014 22:05:55 -0000	1.24
+++ git-r3.eclass	24 Feb 2014 08:43:34 -0000	1.25
@@ -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.24 2014/02/23 22:05:55 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.25 2014/02/24 08:43:34 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -330,6 +330,8 @@
 			"refs/heads/*:refs/heads/*"
 			# pull tags explicitly in order to prune them properly
 			"refs/tags/*:refs/tags/*"
+			# notes in case something needs them
+			"refs/notes/*:refs/notes/*"
 		)
 
 		set -- "${fetch_command[@]}"
@@ -447,9 +449,13 @@
 	"${@}" || die "git clone (for checkout) failed"
 
 	git-r3_sub_checkout() {
+		local orig_repo=${GIT_DIR}
 		local -x GIT_DIR=${out_dir}/.git
 		local -x GIT_WORK_TREE=${out_dir}
 
+		# pull notes
+		git fetch "${orig_repo}" "refs/notes/*:refs/notes/*" || die
+
 		set -- git checkout --quiet
 		if [[ ${remote_ref} ]]; then
 			set -- "${@}" "${remote_ref#refs/heads/}"





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2014-02-23 22:05 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2014-02-23 22:05 UTC (permalink / raw
  To: gentoo-commits

mgorny      14/02/23 22:05:55

  Modified:             ChangeLog git-r3.eclass
  Log:
  Use complete git clones, and clone them onto the checkout directory. This makes it possible for build system to lookup all repository information as requested in bug #489100. Remove shallow clone support since it would require too much effort and make code hard to understand. Additionally obsoletes bug #489100 and git-r3 part of bug #494934.

Revision  Changes    Path
1.1146               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1146&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1146&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1145&r2=1.1146

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1145
retrieving revision 1.1146
diff -u -r1.1145 -r1.1146
--- ChangeLog	22 Feb 2014 17:01:58 -0000	1.1145
+++ ChangeLog	23 Feb 2014 22:05:55 -0000	1.1146
@@ -1,6 +1,13 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1145 2014/02/22 17:01:58 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1146 2014/02/23 22:05:55 mgorny Exp $
+
+  23 Feb 2014; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Use complete git clones, and clone them onto the checkout directory. This
+  makes it possible for build system to lookup all repository information as
+  requested in bug #489100. Remove shallow clone support since it would require
+  too much effort and make code hard to understand. Additionally obsoletes bug
+  #489100 and git-r3 part of bug #494934.
 
   22 Feb 2014; Mike Gilbert <floppym@gentoo.org> python-utils-r1.eclass:
   Add support for python3.4.



1.24                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.23&r2=1.24

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- git-r3.eclass	15 Nov 2013 23:03:23 -0000	1.23
+++ git-r3.eclass	23 Feb 2014 22:05:55 -0000	1.24
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# 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.23 2013/11/15 23:03:23 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.24 2014/02/23 22:05:55 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -8,8 +8,7 @@
 # @BLURB: Eclass for fetching and unpacking git repositories.
 # @DESCRIPTION:
 # Third generation eclass for easing maitenance of live ebuilds using
-# git as remote repository. The eclass supports lightweight (shallow)
-# clones and bare clones of submodules.
+# git as remote repository.
 
 case "${EAPI:-0}" in
 	0|1|2|3|4|5)
@@ -30,7 +29,7 @@
 if [[ ! ${_GIT_R3} ]]; then
 
 if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
-	DEPEND=">=dev-vcs/git-1.8.2.1"
+	DEPEND="dev-vcs/git"
 fi
 
 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
@@ -83,18 +82,6 @@
 #
 # EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
 
-# @ECLASS-VARIABLE: EGIT_NONSHALLOW
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Disable performing shallow fetches/clones. Shallow clones have
-# a fair number of limitations. Therefore, if you'd like the eclass to
-# perform complete clones instead, set this to a non-null value.
-#
-# This variable can be set in make.conf and ebuilds. The make.conf
-# value specifies user-specific default, while ebuilds may use it
-# to force deep clones when the server does not support shallow clones
-# (e.g. Google Code).
-
 # @FUNCTION: _git-r3_env_setup
 # @INTERNAL
 # @DESCRIPTION:
@@ -217,14 +204,13 @@
 	fi
 
 	addwrite "${EGIT3_STORE_DIR}"
+	if [[ -e ${GIT_DIR}/shallow ]]; then
+		einfo "${GIT_DIR} was a shallow clone, recreating..."
+		rm -r "${GIT_DIR}" || die
+	fi
 	if [[ ! -d ${GIT_DIR} ]]; then
 		mkdir "${GIT_DIR}" || die
 		git init --bare || die
-
-		if [[ ! ${EGIT_NONSHALLOW} ]]; then
-			# avoid auto-unshallow :)
-			touch "${GIT_DIR}"/shallow || die
-		fi
 	fi
 }
 
@@ -267,93 +253,6 @@
 	done < <(echo "${data}" | git config -f /dev/fd/0 -l || die)
 }
 
-# @FUNCTION: _git-r3_smart_fetch
-# @USAGE: <git-fetch-args>...
-# @DESCRIPTION:
-# Try fetching without '--depth' and switch to '--depth 1' if that
-# will involve less objects fetched.
-_git-r3_smart_fetch() {
-	debug-print-function ${FUNCNAME} "$@"
-
-	local sed_regexp='.*Counting objects: \([0-9]*\), done\..*'
-
-	# start the main fetch
-	local cmd=( git fetch --progress "${@}" )
-	echo "${cmd[@]}" >&2
-
-	# we copy the output to the 'sed' pipe for parsing. whenever sed finds
-	# the process count, it quits quickly to avoid delays in writing it.
-	# then, we start a dummy 'cat' to keep the pipe alive
-
-	"${cmd[@]}" 2>&1 \
-		| tee >(
-			sed -n -e "/${sed_regexp}/{s/${sed_regexp}/\1/p;q}" \
-				> "${T}"/git-r3_main.count
-			exec cat >/dev/null
-		) &
-	local main_pid=${!}
-
-	# start the helper process
-	_git-r3_sub_fetch() {
-		# wait for main fetch to get object count; if the server doesn't
-		# output it, we won't even launch the parallel process
-		while [[ ! -s ${T}/git-r3_main.count ]]; do
-			sleep 0.25
-		done
-
-		# ok, let's see if parallel fetch gives us smaller count
-		# --dry-run will prevent it from writing to the local clone
-		# and sed should terminate git with SIGPIPE
-		local sub_count=$(git fetch --progress --dry-run --depth 1 "${@}" 2>&1 \
-			| sed -n -e "/${sed_regexp}/{s/${sed_regexp}/\1/p;q}")
-		local main_count=$(<"${T}"/git-r3_main.count)
-
-		# let's be real sure that '--depth 1' will be good for us.
-		# note that we have purely objects counts, and '--depth 1'
-		# may involve much bigger objects
-		if [[ ${main_count} && ${main_count} -ge $(( sub_count * 3/2 )) ]]
-		then
-			# signal that we want shallow fetch instead,
-			# and terminate the non-shallow fetch process
-			touch "${T}"/git-r3_want_shallow || die
-			kill ${main_pid} &>/dev/null
-			exit 0
-		fi
-
-		exit 1
-	}
-	_git-r3_sub_fetch "${@}" &
-	local sub_pid=${!}
-
-	# wait for main process to terminate, either of its own
-	# or by signal from subprocess
-	wait ${main_pid}
-	local main_ret=${?}
-
-	# wait for subprocess to terminate, killing it if necessary.
-	# if main fetch finished before it, there's no point in keeping
-	# it alive. if main fetch was killed by it, it's done anyway
-	kill ${sub_pid} &>/dev/null
-	wait ${sub_pid}
-
-	# now see if subprocess wanted to tell us something...
-	if [[ -f ${T}/git-r3_want_shallow ]]; then
-		rm "${T}"/git-r3_want_shallow || die
-
-		# if fetch finished already (wasn't killed), ignore it
-		[[ ${main_ret} -eq 0 ]] && return 0
-
-		# otherwise, restart as shallow fetch
-		einfo "Restarting fetch using --depth 1 to save bandwidth ..."
-		local cmd=( git fetch --progress --depth 1 "${@}" )
-		echo "${cmd[@]}" >&2
-		"${cmd[@]}"
-		main_ret=${?}
-	fi
-
-	return ${main_ret}
-}
-
 # @FUNCTION: _git-r3_is_local_repo
 # @USAGE: <repo-uri>
 # @INTERNAL
@@ -413,7 +312,7 @@
 	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
 	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
 	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
-	local local_ref=refs/heads/${local_id}/__main__
+	local local_ref=refs/git-r3/${local_id}/__main__
 
 	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
 
@@ -423,93 +322,36 @@
 	# try to fetch from the remote
 	local r success
 	for r in "${repos[@]}"; do
-		einfo "Fetching ${remote_ref} from ${r} ..."
-
-		local is_branch lookup_ref
-		if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
-		then
-			is_branch=1
-			lookup_ref=${remote_ref}
-		else
-			# ls-remote by commit is going to fail anyway,
-			# so we may as well pass refs/tags/ABCDEF...
-			lookup_ref=refs/tags/${remote_ref}
-		fi
+		einfo "Fetching ${r} ..."
 
-		# first, try ls-remote to see if ${remote_ref} is a real ref
-		# and not a commit id. if it succeeds, we can pass ${remote_ref}
-		# to 'fetch'. otherwise, we will just fetch everything
-
-		# split on whitespace
-		local ref=(
-			$(git ls-remote "${r}" "${lookup_ref}" || echo __FAIL__)
+		local fetch_command=(
+			git fetch --prune "${r}"
+			# mirror the remote branches as local branches
+			"refs/heads/*:refs/heads/*"
+			# pull tags explicitly in order to prune them properly
+			"refs/tags/*:refs/tags/*"
 		)
 
-		# normally, ref[0] is a hash, so we can do magic strings here
-		[[ ${ref[0]} == __FAIL__ ]] && continue
-
-		local nonshallow=${EGIT_NONSHALLOW}
-		local ref_param=()
-		if [[ ! ${ref[0]} ]]; then
-			nonshallow=1
-		fi
-
-		# trying to do a shallow clone of a local repo makes git try to
-		# write to the repo. we don't want that to happen.
-		_git-r3_is_local_repo "${r}" && nonshallow=1
-
-		# 1. if we need a non-shallow clone and we have a shallow one,
-		#    we need to unshallow it explicitly.
-		# 2. if we want a shallow clone, we just pass '--depth 1'
-		#    to the first fetch in the repo. passing '--depth'
-		#    to further requests usually results in more data being
-		#    downloaded than without it.
-		# 3. if we update a shallow clone, we try without '--depth'
-		#    first since that usually transfers less data. however,
-		#    we use git-r3_smart_fetch that can switch into '--depth 1'
-		#    if that looks beneficial.
-
-		local fetch_command=( git fetch )
-		if [[ ${nonshallow} ]]; then
-			if [[ -f ${GIT_DIR}/shallow ]]; then
-				ref_param+=( --unshallow )
-			fi
-			# fetch all branches
-			ref_param+=( "refs/heads/*:refs/remotes/origin/*" )
-		else
-			# 'git show-ref --heads' returns 1 when there are no branches
-			if ! git show-ref --heads -q; then
-				ref_param+=( --depth 1 )
+		set -- "${fetch_command[@]}"
+		echo "${@}" >&2
+		if "${@}"; then
+			# now let's see what the user wants from us
+			local full_remote_ref=$(
+				git rev-parse --verify --symbolic-full-name "${remote_ref}"
+			)
+
+			if [[ ${full_remote_ref} ]]; then
+				# when we are given a ref, create a symbolic ref
+				# so that we preserve the actual argument
+				set -- git symbolic-ref "${local_ref}" "${full_remote_ref}"
 			else
-				fetch_command=( _git-r3_smart_fetch )
+				# otherwise, we were likely given a commit id
+				set -- git update-ref --no-deref "${local_ref}" "${remote_ref}"
 			fi
-		fi
-
-		# now, another important thing. we may only fetch a remote
-		# branch directly to a local branch. Otherwise, we need to fetch
-		# the commit and re-create the branch on top of it.
 
-		if [[ ${ref[0]} ]]; then
-			if [[ ${is_branch} ]]; then
-				ref_param+=( -f "${remote_ref}:${local_id}/__main__" )
-			else
-				ref_param+=( "refs/tags/${remote_ref}" )
-			fi
-		fi
-
-		# if ${remote_ref} is branch or tag, ${ref[@]} will contain
-		# the respective commit id. otherwise, it will be an empty
-		# array, so the following won't evaluate to a parameter.
-		set -- "${fetch_command[@]}" --no-tags "${r}" "${ref_param[@]}"
-		echo "${@}" >&2
-		if "${@}"; then
-			if [[ ! ${is_branch} ]]; then
-				set -- git branch -f "${local_id}/__main__" \
-					"${ref[0]:-${remote_ref}}"
-				echo "${@}" >&2
-				if ! "${@}"; then
-					die "Creating branch for ${remote_ref} failed (wrong ref?)."
-				fi
+			echo "${@}" >&2
+			if ! "${@}"; then
+				die "Referencing ${remote_ref} failed (wrong ref?)."
 			fi
 
 			success=1
@@ -581,53 +423,53 @@
 	local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
 	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
 
-	local -x GIT_DIR GIT_WORK_TREE
+	local -x GIT_DIR
 	_git-r3_set_gitdir "${repos[0]}"
-	GIT_WORK_TREE=${out_dir}
-	mkdir -p "${GIT_WORK_TREE}" || die
 
 	einfo "Checking out ${repos[0]} to ${out_dir} ..."
 
-	if ! git cat-file -e refs/heads/"${local_id}"/__main__
-	then
+	if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
 		if [[ ${EVCS_OFFLINE} ]]; then
 			die "No local clone of ${repos[0]}. Unable to work with EVCS_OFFLINE."
 		else
 			die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
 		fi
 	fi
+	local remote_ref=$(
+		git symbolic-ref --quiet refs/git-r3/"${local_id}"/__main__
+	)
+	local new_commit_id=$(
+		git rev-parse --verify refs/git-r3/"${local_id}"/__main__
+	)
 
-	# Note: this is a hack to avoid parallel checkout issues.
-	# I will try to handle it without locks when I have more time.
-	local lockfile=${GIT_DIR}/.git-r3_checkout_lock
-	local lockfile_l=${lockfile}.${BASHPID}
-	touch "${lockfile_l}" || die
-	until ln "${lockfile_l}" "${lockfile}" &>/dev/null; do
-		sleep 1
-	done
-	rm "${lockfile_l}" || die
-
-	set -- git checkout -f "${local_id}"/__main__ .
+	set -- git clone --quiet --shared --no-checkout "${GIT_DIR}" "${out_dir}"/
 	echo "${@}" >&2
-	"${@}"
-	local ret=${?}
+	"${@}" || die "git clone (for checkout) failed"
 
-	# Remove the lock!
-	rm "${lockfile}" || die
-
-	[[ ${ret} == 0 ]] || die "git checkout ${local_id}/__main__ failed"
+	git-r3_sub_checkout() {
+		local -x GIT_DIR=${out_dir}/.git
+		local -x GIT_WORK_TREE=${out_dir}
+
+		set -- git checkout --quiet
+		if [[ ${remote_ref} ]]; then
+			set -- "${@}" "${remote_ref#refs/heads/}"
+		else
+			set -- "${@}" "${new_commit_id}"
+		fi
+		echo "${@}" >&2
+		"${@}" || die "git checkout ${remote_ref:-${new_commit_id}} failed"
+	}
+	git-r3_sub_checkout
 
-	# diff against previous revision (if any)
-	local new_commit_id=$(git rev-parse --verify "${local_id}"/__main__)
 	local old_commit_id=$(
-		git rev-parse --verify "${local_id}"/__old__ 2>/dev/null
+		git rev-parse --quiet --verify refs/git-r3/"${local_id}"/__old__
 	)
-
 	if [[ ! ${old_commit_id} ]]; then
 		echo "GIT NEW branch -->"
 		echo "   repository:               ${repos[0]}"
 		echo "   at the commit:            ${new_commit_id}"
 	else
+		# diff against previous revision
 		echo "GIT update -->"
 		echo "   repository:               ${repos[0]}"
 		# write out message based on the revisions
@@ -641,13 +483,13 @@
 			echo "   at the commit:            ${new_commit_id}"
 		fi
 	fi
-	git branch -f "${local_id}"/{__old__,__main__} || die
+	git update-ref --no-deref refs/git-r3/"${local_id}"/{__old__,__main__} || die
 
 	# recursively checkout submodules
-	if [[ -f ${GIT_WORK_TREE}/.gitmodules ]]; then
+	if [[ -f ${out_dir}/.gitmodules ]]; then
 		local submodules
 		_git-r3_set_submodules \
-			"$(<"${GIT_WORK_TREE}"/.gitmodules)"
+			"$(<"${out_dir}"/.gitmodules)"
 
 		while [[ ${submodules[@]} ]]; do
 			local subname=${submodules[0]}
@@ -658,7 +500,7 @@
 				url=${repos[0]%%/}/${url}
 			fi
 
-			git-r3_checkout "${url}" "${GIT_WORK_TREE}/${path}" \
+			git-r3_checkout "${url}" "${out_dir}/${path}" \
 				"${local_id}/${subname}"
 
 			submodules=( "${submodules[@]:3}" ) # shift
@@ -668,11 +510,6 @@
 	# keep this *after* submodules
 	export EGIT_DIR=${GIT_DIR}
 	export EGIT_VERSION=${new_commit_id}
-
-	# create a fake '.git' directory to satisfy 'git rev-parse HEAD'
-	GIT_DIR=${GIT_WORK_TREE}/.git
-	git init || die
-	echo "${EGIT_VERSION}" > "${GIT_WORK_TREE}"/.git/HEAD || die
 }
 
 # @FUNCTION: git-r3_peek_remote_ref





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-11-15 23:03 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-11-15 23:03 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/11/15 23:03:23

  Modified:             ChangeLog git-r3.eclass
  Log:
  Use shallow clones for local repos. Bug #491260.

Revision  Changes    Path
1.1056               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1056&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1056&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1055&r2=1.1056

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1055
retrieving revision 1.1056
diff -u -r1.1055 -r1.1056
--- ChangeLog	11 Nov 2013 19:47:39 -0000	1.1055
+++ ChangeLog	15 Nov 2013 23:03:23 -0000	1.1056
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1055 2013/11/11 19:47:39 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1056 2013/11/15 23:03:23 mgorny Exp $
+
+  15 Nov 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Use shallow clones for local repos. Bug #491260.
 
   11 Nov 2013; Davide Pesavento <pesa@gentoo.org> qt4-build.eclass:
   Sync with qt overlay. Changes should affect only live ebuilds.



1.23                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.22&r2=1.23

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- git-r3.eclass	30 Oct 2013 19:21:12 -0000	1.22
+++ git-r3.eclass	15 Nov 2013 23:03:23 -0000	1.23
@@ -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.22 2013/10/30 19:21:12 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.23 2013/11/15 23:03:23 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -354,6 +354,20 @@
 	return ${main_ret}
 }
 
+# @FUNCTION: _git-r3_is_local_repo
+# @USAGE: <repo-uri>
+# @INTERNAL
+# @DESCRIPTION:
+# Determine whether the given URI specifies a local (on-disk)
+# repository.
+_git-r3_is_local_repo() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local uri=${1}
+
+	[[ ${uri} == file://* || ${uri} == /* ]]
+}
+
 # @FUNCTION: git-r3_fetch
 # @USAGE: [<repo-uri> [<remote-ref> [<local-id>]]]
 # @DESCRIPTION:
@@ -440,6 +454,10 @@
 			nonshallow=1
 		fi
 
+		# trying to do a shallow clone of a local repo makes git try to
+		# write to the repo. we don't want that to happen.
+		_git-r3_is_local_repo "${r}" && nonshallow=1
+
 		# 1. if we need a non-shallow clone and we have a shallow one,
 		#    we need to unshallow it explicitly.
 		# 2. if we want a shallow clone, we just pass '--depth 1'





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-10-30 19:21 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-10-30 19:21 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/10/30 19:21:12

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fix parallel checkout race conditions, bug #489280.

Revision  Changes    Path
1.1041               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1041&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1041&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1040&r2=1.1041

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1040
retrieving revision 1.1041
diff -u -r1.1040 -r1.1041
--- ChangeLog	30 Oct 2013 19:14:02 -0000	1.1040
+++ ChangeLog	30 Oct 2013 19:21:12 -0000	1.1041
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1040 2013/10/30 19:14:02 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1041 2013/10/30 19:21:12 mgorny Exp $
+
+  30 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Fix parallel checkout race conditions, bug #489280.
 
   30 Oct 2013; Michał Górny <mgorny@gentoo.org> python-r1.eclass,
   python-single-r1.eclass, python-utils-r1.eclass:



1.22                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.22&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.22&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.21&r2=1.22

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- git-r3.eclass	27 Oct 2013 13:44:35 -0000	1.21
+++ git-r3.eclass	30 Oct 2013 19:21:12 -0000	1.22
@@ -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.21 2013/10/27 13:44:35 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.22 2013/10/30 19:21:12 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -579,9 +579,25 @@
 		fi
 	fi
 
+	# Note: this is a hack to avoid parallel checkout issues.
+	# I will try to handle it without locks when I have more time.
+	local lockfile=${GIT_DIR}/.git-r3_checkout_lock
+	local lockfile_l=${lockfile}.${BASHPID}
+	touch "${lockfile_l}" || die
+	until ln "${lockfile_l}" "${lockfile}" &>/dev/null; do
+		sleep 1
+	done
+	rm "${lockfile_l}" || die
+
 	set -- git checkout -f "${local_id}"/__main__ .
 	echo "${@}" >&2
-	"${@}" || die "git checkout ${local_id}/__main__ failed"
+	"${@}"
+	local ret=${?}
+
+	# Remove the lock!
+	rm "${lockfile}" || die
+
+	[[ ${ret} == 0 ]] || die "git checkout ${local_id}/__main__ failed"
 
 	# diff against previous revision (if any)
 	local new_commit_id=$(git rev-parse --verify "${local_id}"/__main__)





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-10-27 13:44 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-10-27 13:44 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/10/27 13:44:35

  Modified:             ChangeLog git-r3.eclass
  Log:
  Create a fake ".git" directory inside the checkout to satisfy git rev-parse uses in build systems. Bug #489100.

Revision  Changes    Path
1.1039               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1039&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1039&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1038&r2=1.1039

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1038
retrieving revision 1.1039
diff -u -r1.1038 -r1.1039
--- ChangeLog	27 Oct 2013 13:33:44 -0000	1.1038
+++ ChangeLog	27 Oct 2013 13:44:35 -0000	1.1039
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1038 2013/10/27 13:33:44 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1039 2013/10/27 13:44:35 mgorny Exp $
+
+  27 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Create a fake ".git" directory inside the checkout to satisfy git rev-parse
+  uses in build systems. Bug #489100.
 
   27 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Strip sub-slot from local repo IDs.



1.21                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.20&r2=1.21

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- git-r3.eclass	27 Oct 2013 13:33:44 -0000	1.20
+++ git-r3.eclass	27 Oct 2013 13:44:35 -0000	1.21
@@ -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.20 2013/10/27 13:33:44 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.21 2013/10/27 13:44:35 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -634,6 +634,11 @@
 	# keep this *after* submodules
 	export EGIT_DIR=${GIT_DIR}
 	export EGIT_VERSION=${new_commit_id}
+
+	# create a fake '.git' directory to satisfy 'git rev-parse HEAD'
+	GIT_DIR=${GIT_WORK_TREE}/.git
+	git init || die
+	echo "${EGIT_VERSION}" > "${GIT_WORK_TREE}"/.git/HEAD || die
 }
 
 # @FUNCTION: git-r3_peek_remote_ref





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-10-27 13:33 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-10-27 13:33 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/10/27 13:33:45

  Modified:             ChangeLog git-r3.eclass
  Log:
  Strip sub-slot from local repo IDs.

Revision  Changes    Path
1.1038               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1038&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1038&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1037&r2=1.1038

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1037
retrieving revision 1.1038
diff -u -r1.1037 -r1.1038
--- ChangeLog	27 Oct 2013 07:27:52 -0000	1.1037
+++ ChangeLog	27 Oct 2013 13:33:44 -0000	1.1038
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1037 2013/10/27 07:27:52 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1038 2013/10/27 13:33:44 mgorny Exp $
+
+  27 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Strip sub-slot from local repo IDs.
 
   27 Oct 2013; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
   Remove deprecated functions.



1.20                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.19&r2=1.20

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- git-r3.eclass	26 Oct 2013 06:19:13 -0000	1.19
+++ git-r3.eclass	27 Oct 2013 13:33:44 -0000	1.20
@@ -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.19 2013/10/26 06:19:13 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.20 2013/10/27 13:33:44 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -374,7 +374,7 @@
 # <local-id> specifies the local branch identifier that will be used to
 # locally store the fetch result. It should be unique to multiple
 # fetches within the repository that can be performed at the same time
-# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT}.
+# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT%/*}.
 # This default should be fine unless you are fetching multiple trees
 # from the same repository in the same ebuild.
 #
@@ -398,7 +398,7 @@
 
 	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
 	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
-	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
+	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
 	local local_ref=refs/heads/${local_id}/__main__
 
 	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
@@ -561,7 +561,7 @@
 	fi
 
 	local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
-	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
+	local local_id=${3:-${CATEGORY}/${PN}/${SLOT%/*}}
 
 	local -x GIT_DIR GIT_WORK_TREE
 	_git-r3_set_gitdir "${repos[0]}"





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-10-26  6:19 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-10-26  6:19 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/10/26 06:19:13

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fix handling relative submodule paths.

Revision  Changes    Path
1.1034               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1034&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1034&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1033&r2=1.1034

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1033
retrieving revision 1.1034
diff -u -r1.1033 -r1.1034
--- ChangeLog	22 Oct 2013 19:23:47 -0000	1.1033
+++ ChangeLog	26 Oct 2013 06:19:13 -0000	1.1034
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1033 2013/10/22 19:23:47 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1034 2013/10/26 06:19:13 mgorny Exp $
+
+  26 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Fix handling relative submodule paths.
 
   22 Oct 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
   Fix failing to pass default install arguments when user passes an additional



1.19                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.18&r2=1.19

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- git-r3.eclass	14 Oct 2013 20:30:00 -0000	1.18
+++ git-r3.eclass	26 Oct 2013 06:19:13 -0000	1.19
@@ -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.18 2013/10/14 20:30:00 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.19 2013/10/26 06:19:13 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -515,8 +515,13 @@
 			if [[ ! ${commit} ]]; then
 				die "Unable to get commit id for submodule ${subname}"
 			fi
+			if [[ ${url} == ./* || ${url} == ../* ]]; then
+				local subrepos=( "${repos[@]/%//${url}}" )
+			else
+				local subrepos=( "${url}" )
+			fi
 
-			git-r3_fetch "${url}" "${commit}" "${local_id}/${subname}"
+			git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
 
 			submodules=( "${submodules[@]:3}" ) # shift
 		done
@@ -615,6 +620,10 @@
 			local url=${submodules[1]}
 			local path=${submodules[2]}
 
+			if [[ ${url} == ./* || ${url} == ../* ]]; then
+				url=${repos[0]%%/}/${url}
+			fi
+
 			git-r3_checkout "${url}" "${GIT_WORK_TREE}/${path}" \
 				"${local_id}/${subname}"
 





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-10-13  7:14 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-10-13  7:14 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/10/13 07:14:59

  Modified:             ChangeLog git-r3.eclass
  Log:
  Respect EVCS_OFFLINE in git-r3_fetch.

Revision  Changes    Path
1.1021               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1021&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1021&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1020&r2=1.1021

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1020
retrieving revision 1.1021
diff -u -r1.1020 -r1.1021
--- ChangeLog	12 Oct 2013 15:12:59 -0000	1.1020
+++ ChangeLog	13 Oct 2013 07:14:58 -0000	1.1021
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1020 2013/10/12 15:12:59 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1021 2013/10/13 07:14:58 mgorny Exp $
+
+  13 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Respect EVCS_OFFLINE in git-r3_fetch.
 
   12 Oct 2013; Jeroen Roovers <jer@gentoo.org> nvidia-driver.eclass:
   Use readme.gentoo.eclass (bug #457594).



1.16                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.15&r2=1.16

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- git-r3.eclass	9 Oct 2013 17:14:07 -0000	1.15
+++ git-r3.eclass	13 Oct 2013 07:14:58 -0000	1.16
@@ -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.15 2013/10/09 17:14:07 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.16 2013/10/13 07:14:58 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -385,6 +385,8 @@
 git-r3_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	[[ ${EVCS_OFFLINE} ]] && return
+
 	local repos
 	if [[ ${1} ]]; then
 		repos=( ${1} )
@@ -695,8 +697,6 @@
 git-r3_src_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	[[ ${EVCS_OFFLINE} ]] && return
-
 	if [[ ! ${EGIT3_STORE_DIR} && ${EGIT_STORE_DIR} ]]; then
 		ewarn "You have set EGIT_STORE_DIR but not EGIT3_STORE_DIR. Please consider"
 		ewarn "setting EGIT3_STORE_DIR for git-r3.eclass. It is recommended to use"





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-10-09 17:14 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-10-09 17:14 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/10/09 17:14:07

  Modified:             ChangeLog git-r3.eclass
  Log:
  Skip submodules that have update=none specified in config. Fixes bug #487262.

Revision  Changes    Path
1.1015               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1015&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1015&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1014&r2=1.1015

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1014
retrieving revision 1.1015
diff -u -r1.1014 -r1.1015
--- ChangeLog	8 Oct 2013 11:19:48 -0000	1.1014
+++ ChangeLog	9 Oct 2013 17:14:07 -0000	1.1015
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1014 2013/10/08 11:19:48 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1015 2013/10/09 17:14:07 mgorny Exp $
+
+  09 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Skip submodules that have update=none specified in config. Fixes bug #487262.
 
   08 Oct 2013; Michał Górny <mgorny@gentoo.org> git-2.eclass, git-r3.eclass:
   Fix git-r3 -> git-2 dependency leak, as noted in bug #487026.



1.15                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.14&r2=1.15

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- git-r3.eclass	8 Oct 2013 11:19:48 -0000	1.14
+++ git-r3.eclass	9 Oct 2013 17:14:07 -0000	1.15
@@ -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.14 2013/10/08 11:19:48 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.15 2013/10/09 17:14:07 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -252,6 +252,11 @@
 		l=${l#submodule.}
 		local subname=${l%%.url=*}
 
+		# skip modules that have 'update = none', bug #487262.
+		local upd=$(echo "${data}" | git config -f /dev/fd/0 \
+			submodule."${subname}".update)
+		[[ ${upd} == none ]] && continue
+
 		submodules+=(
 			"${subname}"
 			"$(echo "${data}" | git config -f /dev/fd/0 \





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-10-05 16:48 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-10-05 16:48 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/10/05 16:48:25

  Modified:             ChangeLog git-r3.eclass
  Log:
  Add missing git DEPEND wrt bug #487026.

Revision  Changes    Path
1.1009               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1009&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1009&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1008&r2=1.1009

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1008
retrieving revision 1.1009
diff -u -r1.1008 -r1.1009
--- ChangeLog	5 Oct 2013 13:40:57 -0000	1.1008
+++ ChangeLog	5 Oct 2013 16:48:25 -0000	1.1009
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1008 2013/10/05 13:40:57 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1009 2013/10/05 16:48:25 mgorny Exp $
+
+  05 Oct 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Add missing git DEPEND wrt bug #487026.
 
   05 Oct 2013; Vlastimil Babka <caster@gentoo.org> java-ant-2.eclass:
   Convert comments for eclass manpages. Heavily based on work from ercpe, bug



1.13                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.12&r2=1.13

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- git-r3.eclass	27 Sep 2013 16:22:28 -0000	1.12
+++ git-r3.eclass	5 Oct 2013 16:48:25 -0000	1.13
@@ -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.12 2013/09/27 16:22:28 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.13 2013/10/05 16:48:25 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -29,6 +29,8 @@
 
 if [[ ! ${_GIT_R3} ]]; then
 
+DEPEND=">=dev-vcs/git-1.8.2.1"
+
 # @ECLASS-VARIABLE: EGIT3_STORE_DIR
 # @DESCRIPTION:
 # Storage directory for git sources.





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-27 16:22 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-27 16:22 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/27 16:22:28

  Modified:             ChangeLog git-r3.eclass
  Log:
  Always fetch all branches when doing non-shallow fetch.

Revision  Changes    Path
1.992                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.992&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.992&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.991&r2=1.992

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.991
retrieving revision 1.992
diff -u -r1.991 -r1.992
--- ChangeLog	26 Sep 2013 21:04:42 -0000	1.991
+++ ChangeLog	27 Sep 2013 16:22:28 -0000	1.992
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.991 2013/09/26 21:04:42 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.992 2013/09/27 16:22:28 mgorny Exp $
+
+  27 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Always fetch all branches when doing non-shallow fetch.
 
   26 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Fix parsing EGIT_REPO_URI. Bug #486080.



1.12                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.11&r2=1.12

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- git-r3.eclass	26 Sep 2013 21:04:42 -0000	1.11
+++ git-r3.eclass	27 Sep 2013 16:22:28 -0000	1.12
@@ -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.11 2013/09/26 21:04:42 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.12 2013/09/27 16:22:28 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -445,6 +445,8 @@
 			if [[ -f ${GIT_DIR}/shallow ]]; then
 				ref_param+=( --unshallow )
 			fi
+			# fetch all branches
+			ref_param+=( "refs/heads/*:refs/remotes/origin/*" )
 		else
 			# 'git show-ref --heads' returns 1 when there are no branches
 			if ! git show-ref --heads -q; then





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-26 21:04 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-26 21:04 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/26 21:04:42

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fix parsing EGIT_REPO_URI. Bug #486080.

Revision  Changes    Path
1.991                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.991&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.991&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.990&r2=1.991

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.990
retrieving revision 1.991
diff -u -r1.990 -r1.991
--- ChangeLog	26 Sep 2013 12:38:38 -0000	1.990
+++ ChangeLog	26 Sep 2013 21:04:42 -0000	1.991
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.990 2013/09/26 12:38:38 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.991 2013/09/26 21:04:42 mgorny Exp $
+
+  26 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Fix parsing EGIT_REPO_URI. Bug #486080.
 
   26 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Update doc on EGIT_NONSHALLOW.



1.11                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.10&r2=1.11

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- git-r3.eclass	26 Sep 2013 12:38:38 -0000	1.10
+++ git-r3.eclass	26 Sep 2013 21:04:42 -0000	1.11
@@ -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.10 2013/09/26 12:38:38 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.11 2013/09/26 21:04:42 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -376,11 +376,15 @@
 git-r3_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
-		local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+	local repos
+	if [[ ${1} ]]; then
+		repos=( ${1} )
+	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+		repos=( "${EGIT_REPO_URI[@]}" )
+	else
+		repos=( ${EGIT_REPO_URI} )
 	fi
 
-	local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
 	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
 	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
 	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
@@ -529,11 +533,15 @@
 git-r3_checkout() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
-		local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+	local repos
+	if [[ ${1} ]]; then
+		repos=( ${1} )
+	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+		repos=( "${EGIT_REPO_URI[@]}" )
+	else
+		repos=( ${EGIT_REPO_URI} )
 	fi
 
-	local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
 	local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
 	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
 
@@ -630,11 +638,15 @@
 git-r3_peek_remote_ref() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
-		local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+	local repos
+	if [[ ${1} ]]; then
+		repos=( ${1} )
+	elif [[ $(declare -p EGIT_REPO_URI) == "declare -a"* ]]; then
+		repos=( "${EGIT_REPO_URI[@]}" )
+	else
+		repos=( ${EGIT_REPO_URI} )
 	fi
 
-	local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
 	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
 	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
 





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-26 12:38 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-26 12:38 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/26 12:38:38

  Modified:             ChangeLog git-r3.eclass
  Log:
  Update doc on EGIT_NONSHALLOW.

Revision  Changes    Path
1.990                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.990&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.990&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.989&r2=1.990

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.989
retrieving revision 1.990
diff -u -r1.989 -r1.990
--- ChangeLog	26 Sep 2013 11:58:41 -0000	1.989
+++ ChangeLog	26 Sep 2013 12:38:38 -0000	1.990
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.989 2013/09/26 11:58:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.990 2013/09/26 12:38:38 mgorny Exp $
+
+  26 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Update doc on EGIT_NONSHALLOW.
 
   26 Sep 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
   Wrap symlinks installed to PYTHON_SCRIPTDIR as well.



1.10                 eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.9&r2=1.10

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- git-r3.eclass	25 Sep 2013 11:19:09 -0000	1.9
+++ git-r3.eclass	26 Sep 2013 12:38:38 -0000	1.10
@@ -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.9 2013/09/25 11:19:09 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.10 2013/09/26 12:38:38 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -86,8 +86,10 @@
 # a fair number of limitations. Therefore, if you'd like the eclass to
 # perform complete clones instead, set this to a non-null value.
 #
-# This variable is to be set in make.conf. Ebuilds are not allowed
-# to set it.
+# This variable can be set in make.conf and ebuilds. The make.conf
+# value specifies user-specific default, while ebuilds may use it
+# to force deep clones when the server does not support shallow clones
+# (e.g. Google Code).
 
 # @FUNCTION: _git-r3_env_setup
 # @INTERNAL





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-25 11:19 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-25 11:19 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/25 11:19:09

  Modified:             ChangeLog git-r3.eclass
  Log:
  Support EGIT_REPO_URI being an array. This is needed for tests.

Revision  Changes    Path
1.986                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.986&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.986&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.985&r2=1.986

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.985
retrieving revision 1.986
diff -u -r1.985 -r1.986
--- ChangeLog	25 Sep 2013 10:49:11 -0000	1.985
+++ ChangeLog	25 Sep 2013 11:19:09 -0000	1.986
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.985 2013/09/25 10:49:11 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.986 2013/09/25 11:19:09 mgorny Exp $
+
+  25 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Support EGIT_REPO_URI being an array. This is needed for tests.
 
   25 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Update git URI stripping for gnome.org.



1.9                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.8&r2=1.9

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- git-r3.eclass	25 Sep 2013 10:49:11 -0000	1.8
+++ git-r3.eclass	25 Sep 2013 11:19:09 -0000	1.9
@@ -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.8 2013/09/25 10:49:11 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.9 2013/09/25 11:19:09 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -44,6 +44,8 @@
 #
 # It can be overriden via env using ${PN}_LIVE_REPO variable.
 #
+# Can be a whitespace-separated list or an array.
+#
 # Example:
 # @CODE
 # EGIT_REPO_URI="git://a/b.git https://c/d.git"
@@ -372,7 +374,11 @@
 git-r3_fetch() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	local repos=( ${1:-${EGIT_REPO_URI}} )
+	if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
+		local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+	fi
+
+	local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
 	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
 	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
 	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
@@ -381,11 +387,11 @@
 	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
 
 	local -x GIT_DIR
-	_git-r3_set_gitdir ${repos[0]}
+	_git-r3_set_gitdir "${repos[0]}"
 
 	# try to fetch from the remote
 	local r success
-	for r in ${repos[@]}; do
+	for r in "${repos[@]}"; do
 		einfo "Fetching ${remote_ref} from ${r} ..."
 
 		local is_branch lookup_ref
@@ -521,12 +527,16 @@
 git-r3_checkout() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	local repos=( ${1:-${EGIT_REPO_URI}} )
+	if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
+		local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+	fi
+
+	local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
 	local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
 	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
 
 	local -x GIT_DIR GIT_WORK_TREE
-	_git-r3_set_gitdir ${repos[0]}
+	_git-r3_set_gitdir "${repos[0]}"
 	GIT_WORK_TREE=${out_dir}
 	mkdir -p "${GIT_WORK_TREE}"
 
@@ -618,14 +628,18 @@
 git-r3_peek_remote_ref() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	local repos=( ${1:-${EGIT_REPO_URI}} )
+	if [[ $(declare -p EGIT_REPO_URI) != "declare -a"* ]]; then
+		local EGIT_REPO_URI=( ${EGIT_REPO_URI} )
+	fi
+
+	local repos=( "${1:-${EGIT_REPO_URI[@]}}" )
 	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
 	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
 
 	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"
 
 	local r success
-	for r in ${repos[@]}; do
+	for r in "${repos[@]}"; do
 		einfo "Peeking ${remote_ref} on ${r} ..." >&2
 
 		local is_branch lookup_ref





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-25 10:49 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-25 10:49 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/25 10:49:11

  Modified:             ChangeLog git-r3.eclass
  Log:
  Update git URI stripping for gnome.org.

Revision  Changes    Path
1.985                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.985&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.985&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.984&r2=1.985

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.984
retrieving revision 1.985
diff -u -r1.984 -r1.985
--- ChangeLog	24 Sep 2013 19:53:06 -0000	1.984
+++ ChangeLog	25 Sep 2013 10:49:11 -0000	1.985
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.984 2013/09/24 19:53:06 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.985 2013/09/25 10:49:11 mgorny Exp $
+
+  25 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Update git URI stripping for gnome.org.
 
   24 Sep 2013; Michał Górny <mgorny@gentoo.org> python-any-r1.eclass:
   Introduce python_gen_any_dep to generate any-of dependencies matching



1.8                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.7&r2=1.8

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- git-r3.eclass	19 Sep 2013 09:42:32 -0000	1.7
+++ git-r3.eclass	25 Sep 2013 10:49:11 -0000	1.8
@@ -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.7 2013/09/19 09:42:32 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.8 2013/09/25 10:49:11 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -178,6 +178,8 @@
 	# e.g. git://X/Y.git vs https://X/git/Y.git
 	# (but just one of the prefixes)
 	case "${repo_name}" in
+		# gnome.org... who else?
+		browse/*) repo_name=${repo_name#browse/};;
 		# cgit can proxy requests to git
 		cgit/*) repo_name=${repo_name#cgit/};;
 		# pretty common





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-19  9:42 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-19  9:42 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/19 09:42:32

  Modified:             ChangeLog git-r3.eclass
  Log:
  Strip trailing slashes from repo URI when determining local copy directory.

Revision  Changes    Path
1.980                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.980&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.980&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.979&r2=1.980

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.979
retrieving revision 1.980
diff -u -r1.979 -r1.980
--- ChangeLog	19 Sep 2013 09:37:14 -0000	1.979
+++ ChangeLog	19 Sep 2013 09:42:32 -0000	1.980
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.979 2013/09/19 09:37:14 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.980 2013/09/19 09:42:32 mgorny Exp $
+
+  19 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Strip trailing slashes from repo URI when determining local copy directory.
 
   19 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Do not even create shallow repository when EGIT_NONSHALLOW is set. Otherwise,



1.7                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.6&r2=1.7

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- git-r3.eclass	19 Sep 2013 09:37:14 -0000	1.6
+++ git-r3.eclass	19 Sep 2013 09:42:32 -0000	1.7
@@ -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.6 2013/09/19 09:37:14 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.7 2013/09/19 09:42:32 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -171,6 +171,9 @@
 
 	local repo_name=${1#*://*/}
 
+	# strip the trailing slash
+	repo_name=${repo_name%/}
+
 	# strip common prefixes to make paths more likely to match
 	# e.g. git://X/Y.git vs https://X/git/Y.git
 	# (but just one of the prefixes)





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-19  9:37 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-19  9:37 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/19 09:37:14

  Modified:             ChangeLog git-r3.eclass
  Log:
  Do not even create shallow repository when EGIT_NONSHALLOW is set. Otherwise, the eclass tries to unshallow it and that breaks broken git servers like Google Code.

Revision  Changes    Path
1.979                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.979&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.979&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.978&r2=1.979

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.978
retrieving revision 1.979
diff -u -r1.978 -r1.979
--- ChangeLog	18 Sep 2013 22:48:10 -0000	1.978
+++ ChangeLog	19 Sep 2013 09:37:14 -0000	1.979
@@ -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.978 2013/09/18 22:48:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.979 2013/09/19 09:37:14 mgorny Exp $
+
+  19 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Do not even create shallow repository when EGIT_NONSHALLOW is set. Otherwise,
+  the eclass tries to unshallow it and that breaks broken git servers like
+  Google Code.
 
   18 Sep 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
   Fix accepting arguments in distutils_install_for_testing.



1.6                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.5&r2=1.6

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- git-r3.eclass	13 Sep 2013 15:08:37 -0000	1.5
+++ git-r3.eclass	19 Sep 2013 09:37:14 -0000	1.6
@@ -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.5 2013/09/13 15:08:37 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.6 2013/09/19 09:37:14 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -208,8 +208,10 @@
 		mkdir "${GIT_DIR}" || die
 		git init --bare || die
 
-		# avoid auto-unshallow :)
-		touch "${GIT_DIR}"/shallow || die
+		if [[ ! ${EGIT_NONSHALLOW} ]]; then
+			# avoid auto-unshallow :)
+			touch "${GIT_DIR}"/shallow || die
+		fi
 	fi
 }
 





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-13 15:08 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-13 15:08 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/13 15:08:37

  Modified:             ChangeLog git-r3.eclass
  Log:
  Fail early on unreachable URLs. If ls-remote fails due to server being unreachable, there is no point in attempting to fetch.

Revision  Changes    Path
1.963                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.963&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.963&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.962&r2=1.963

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.962
retrieving revision 1.963
diff -u -r1.962 -r1.963
--- ChangeLog	13 Sep 2013 15:04:36 -0000	1.962
+++ ChangeLog	13 Sep 2013 15:08:37 -0000	1.963
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.962 2013/09/13 15:04:36 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.963 2013/09/13 15:08:37 mgorny Exp $
+
+  13 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Fail early on unreachable URLs. If ls-remote fails due to server being
+  unreachable, there is no point in attempting to fetch.
 
   13 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
   Do not leak EGIT_NONSHALLOW over loop iterations. Failing URL may cause



1.5                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.4&r2=1.5

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- git-r3.eclass	13 Sep 2013 15:04:36 -0000	1.4
+++ git-r3.eclass	13 Sep 2013 15:08:37 -0000	1.5
@@ -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.4 2013/09/13 15:04:36 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.5 2013/09/13 15:08:37 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -398,9 +398,12 @@
 
 		# split on whitespace
 		local ref=(
-			$(git ls-remote "${r}" "${lookup_ref}")
+			$(git ls-remote "${r}" "${lookup_ref}" || echo __FAIL__)
 		)
 
+		# normally, ref[0] is a hash, so we can do magic strings here
+		[[ ${ref[0]} == __FAIL__ ]] && continue
+
 		local nonshallow=${EGIT_NONSHALLOW}
 		local ref_param=()
 		if [[ ! ${ref[0]} ]]; then





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-13 15:04 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-13 15:04 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/13 15:04:36

  Modified:             ChangeLog git-r3.eclass
  Log:
  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.

Revision  Changes    Path
1.962                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.962&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.962&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.961&r2=1.962

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.961
retrieving revision 1.962
diff -u -r1.961 -r1.962
--- ChangeLog	13 Sep 2013 11:22:52 -0000	1.961
+++ ChangeLog	13 Sep 2013 15:04:36 -0000	1.962
@@ -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.



1.4                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.3&r2=1.4

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- git-r3.eclass	9 Sep 2013 16:01:17 -0000	1.3
+++ git-r3.eclass	13 Sep 2013 15:04:36 -0000	1.4
@@ -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 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 @@
 		#    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





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-09 16:01 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-09 16:01 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/09 16:01:17

  Modified:             ChangeLog git-r3.eclass
  Log:
  Introduce smart switching between "git fetch" and "git fetch --depth 1" to save bandwidth.

Revision  Changes    Path
1.954                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.954&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.954&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.953&r2=1.954

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.953
retrieving revision 1.954
diff -u -r1.953 -r1.954
--- ChangeLog	8 Sep 2013 22:54:23 -0000	1.953
+++ ChangeLog	9 Sep 2013 16:01:16 -0000	1.954
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.953 2013/09/08 22:54:23 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.954 2013/09/09 16:01:16 mgorny Exp $
+
+  09 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Introduce smart switching between "git fetch" and "git fetch --depth 1" to
+  save bandwidth.
 
   08 Sep 2013; Michał Górny <mgorny@gentoo.org> git-2.eclass:
   Inherit git-r3 unconditionally to avoid metadata variancy. The eclass is



1.3                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.2&r2=1.3

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- git-r3.eclass	5 Sep 2013 22:40:12 -0000	1.2
+++ git-r3.eclass	9 Sep 2013 16:01:17 -0000	1.3
@@ -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.2 2013/09/05 22:40:12 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.3 2013/09/09 16:01:17 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -247,6 +247,93 @@
 	done < <(echo "${data}" | git config -f /dev/fd/0 -l)
 }
 
+# @FUNCTION: _git-r3_smart_fetch
+# @USAGE: <git-fetch-args>...
+# @DESCRIPTION:
+# Try fetching without '--depth' and switch to '--depth 1' if that
+# will involve less objects fetched.
+_git-r3_smart_fetch() {
+	debug-print-function ${FUNCNAME} "$@"
+
+	local sed_regexp='.*Counting objects: \([0-9]*\), done\..*'
+
+	# start the main fetch
+	local cmd=( git fetch --progress "${@}" )
+	echo "${cmd[@]}" >&2
+
+	# we copy the output to the 'sed' pipe for parsing. whenever sed finds
+	# the process count, it quits quickly to avoid delays in writing it.
+	# then, we start a dummy 'cat' to keep the pipe alive
+
+	"${cmd[@]}" 2>&1 \
+		| tee >(
+			sed -n -e "/${sed_regexp}/{s/${sed_regexp}/\1/p;q}" \
+				> "${T}"/git-r3_main.count
+			exec cat >/dev/null
+		) &
+	local main_pid=${!}
+
+	# start the helper process
+	_git-r3_sub_fetch() {
+		# wait for main fetch to get object count; if the server doesn't
+		# output it, we won't even launch the parallel process
+		while [[ ! -s ${T}/git-r3_main.count ]]; do
+			sleep 0.25
+		done
+
+		# ok, let's see if parallel fetch gives us smaller count
+		# --dry-run will prevent it from writing to the local clone
+		# and sed should terminate git with SIGPIPE
+		local sub_count=$(git fetch --progress --dry-run --depth 1 "${@}" 2>&1 \
+			| sed -n -e "/${sed_regexp}/{s/${sed_regexp}/\1/p;q}")
+		local main_count=$(<"${T}"/git-r3_main.count)
+
+		# let's be real sure that '--depth 1' will be good for us.
+		# note that we have purely objects counts, and '--depth 1'
+		# may involve much bigger objects
+		if [[ ${main_count} && ${main_count} -ge $(( sub_count * 3/2 )) ]]
+		then
+			# signal that we want shallow fetch instead,
+			# and terminate the non-shallow fetch process
+			touch "${T}"/git-r3_want_shallow || die
+			kill ${main_pid} &>/dev/null
+			exit 0
+		fi
+
+		exit 1
+	}
+	_git-r3_sub_fetch "${@}" &
+	local sub_pid=${!}
+
+	# wait for main process to terminate, either of its own
+	# or by signal from subprocess
+	wait ${main_pid}
+	local main_ret=${?}
+
+	# wait for subprocess to terminate, killing it if necessary.
+	# if main fetch finished before it, there's no point in keeping
+	# it alive. if main fetch was killed by it, it's done anyway
+	kill ${sub_pid} &>/dev/null
+	wait ${sub_pid}
+
+	# now see if subprocess wanted to tell us something...
+	if [[ -f ${T}/git-r3_want_shallow ]]; then
+		rm "${T}"/git-r3_want_shallow || die
+
+		# if fetch finished already (wasn't killed), ignore it
+		[[ ${main_ret} -eq 0 ]] && return 0
+
+		# otherwise, restart as shallow fetch
+		einfo "Restarting fetch using --depth 1 to save bandwidth ..."
+		local cmd=( git fetch --progress --depth 1 "${@}" )
+		echo "${cmd[@]}" >&2
+		"${cmd[@]}"
+		main_ret=${?}
+	fi
+
+	return ${main_ret}
+}
+
 # @FUNCTION: git-r3_fetch
 # @USAGE: [<repo-uri> [<remote-ref> [<local-id>]]]
 # @DESCRIPTION:
@@ -325,9 +412,12 @@
 		#    to the first fetch in the repo. passing '--depth'
 		#    to further requests usually results in more data being
 		#    downloaded than without it.
-		# 3. in any other case, we just do plain 'git fetch' and let
-		#    git to do its best (on top of shallow or non-shallow repo).
+		# 3. if we update a shallow clone, we try without '--depth'
+		#    first since that usually transfers less data. however,
+		#    we use git-r3_smart_fetch that can switch into '--depth 1'
+		#    if that looks beneficial.
 
+		local fetch_command=( git fetch )
 		if [[ ${EGIT_NONSHALLOW} ]]; then
 			if [[ -f ${GIT_DIR}/shallow ]]; then
 				ref_param+=( --unshallow )
@@ -336,6 +426,8 @@
 			# 'git show-ref --heads' returns 1 when there are no branches
 			if ! git show-ref --heads -q; then
 				ref_param+=( --depth 1 )
+			else
+				fetch_command=( _git-r3_smart_fetch )
 			fi
 		fi
 
@@ -354,7 +446,7 @@
 		# if ${remote_ref} is branch or tag, ${ref[@]} will contain
 		# the respective commit id. otherwise, it will be an empty
 		# array, so the following won't evaluate to a parameter.
-		set -- git fetch --no-tags "${r}" "${ref_param[@]}"
+		set -- "${fetch_command[@]}" --no-tags "${r}" "${ref_param[@]}"
 		echo "${@}" >&2
 		if "${@}"; then
 			if [[ ! ${is_branch} ]]; then





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-05 22:40 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-05 22:40 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/05 22:40:12

  Modified:             ChangeLog git-r3.eclass
  Log:
  Do not pass --depth when updating a branch, it trrigers issues in git. Instead, use it for the first fetch only.

Revision  Changes    Path
1.949                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.949&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.949&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.948&r2=1.949

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.948
retrieving revision 1.949
diff -u -r1.948 -r1.949
--- ChangeLog	5 Sep 2013 20:39:41 -0000	1.948
+++ ChangeLog	5 Sep 2013 22:40:12 -0000	1.949
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.948 2013/09/05 20:39:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.949 2013/09/05 22:40:12 mgorny Exp $
+
+  05 Sep 2013; Michał Górny <mgorny@gentoo.org> git-r3.eclass:
+  Do not pass --depth when updating a branch, it trrigers issues in git.
+  Instead, use it for the first fetch only.
 
   05 Sep 2013; Michał Górny <mgorny@gentoo.org> git-2.eclass:
   Support using git-r3 backend in git-2.



1.2                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.1&r2=1.2

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- git-r3.eclass	5 Sep 2013 20:24:10 -0000	1.1
+++ git-r3.eclass	5 Sep 2013 22:40:12 -0000	1.2
@@ -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.1 2013/09/05 20:24:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.2 2013/09/05 22:40:12 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -314,27 +314,35 @@
 			$(git ls-remote "${r}" "${lookup_ref}")
 		)
 
-		# now, another important thing. we may only fetch a remote
-		# branch directly to a local branch. Otherwise, we need to fetch
-		# the commit and re-create the branch on top of it.
-
 		local ref_param=()
 		if [[ ! ${ref[0]} ]]; then
 			local EGIT_NONSHALLOW=1
 		fi
 
-		if [[ ! -f ${GIT_DIR}/shallow ]]; then
-			# if it's a complete repo, fetch it as-is
-			:
-		elif [[ ${EGIT_NONSHALLOW} ]]; then
-			# if it's a shallow clone but we need complete,
-			# unshallow it
-			ref_param+=( --unshallow )
+		# 1. if we need a non-shallow clone and we have a shallow one,
+		#    we need to unshallow it explicitly.
+		# 2. if we want a shallow clone, we just pass '--depth 1'
+		#    to the first fetch in the repo. passing '--depth'
+		#    to further requests usually results in more data being
+		#    downloaded than without it.
+		# 3. in any other case, we just do plain 'git fetch' and let
+		#    git to do its best (on top of shallow or non-shallow repo).
+
+		if [[ ${EGIT_NONSHALLOW} ]]; then
+			if [[ -f ${GIT_DIR}/shallow ]]; then
+				ref_param+=( --unshallow )
+			fi
 		else
-			# otherwise, just fetch as shallow
-			ref_param+=( --depth 1 )
+			# 'git show-ref --heads' returns 1 when there are no branches
+			if ! git show-ref --heads -q; then
+				ref_param+=( --depth 1 )
+			fi
 		fi
 
+		# now, another important thing. we may only fetch a remote
+		# branch directly to a local branch. Otherwise, we need to fetch
+		# the commit and re-create the branch on top of it.
+
 		if [[ ${ref[0]} ]]; then
 			if [[ ${is_branch} ]]; then
 				ref_param+=( -f "${remote_ref}:${local_id}/__main__" )





^ permalink raw reply	[flat|nested] 47+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass
@ 2013-09-05 20:24 Michal Gorny (mgorny)
  0 siblings, 0 replies; 47+ messages in thread
From: Michal Gorny (mgorny) @ 2013-09-05 20:24 UTC (permalink / raw
  To: gentoo-commits

mgorny      13/09/05 20:24:10

  Modified:             ChangeLog
  Added:                git-r3.eclass
  Log:
  Introduce the new git eclass.

Revision  Changes    Path
1.947                eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.947&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.947&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.946&r2=1.947

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.946
retrieving revision 1.947
diff -u -r1.946 -r1.947
--- ChangeLog	5 Sep 2013 17:04:26 -0000	1.946
+++ ChangeLog	5 Sep 2013 20:24:10 -0000	1.947
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.946 2013/09/05 17:04:26 tomwij Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.947 2013/09/05 20:24:10 mgorny Exp $
+
+  05 Sep 2013; Michał Górny <mgorny@gentoo.org> +git-r3.eclass:
+  Introduce the new git eclass.
 
   05 Sep 2013; Tom Wijsman <TomWij@gentoo.org> kernel-2.eclass:
   Added support for experimental genpatches.



1.1                  eclass/git-r3.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.1&content-type=text/plain

Index: git-r3.eclass
===================================================================
# 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.1 2013/09/05 20:24:10 mgorny Exp $

# @ECLASS: git-r3.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
# @BLURB: Eclass for fetching and unpacking git repositories.
# @DESCRIPTION:
# Third generation eclass for easing maitenance of live ebuilds using
# git as remote repository. The eclass supports lightweight (shallow)
# clones and bare clones of submodules.

case "${EAPI:-0}" in
	0|1|2|3|4|5)
		;;
	*)
		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
		;;
esac

if [[ ! ${_GIT_R3} ]]; then

inherit eutils

fi

EXPORT_FUNCTIONS src_unpack

if [[ ! ${_GIT_R3} ]]; then

# @ECLASS-VARIABLE: EGIT3_STORE_DIR
# @DESCRIPTION:
# Storage directory for git sources.
#
# EGIT3_STORE_DIR=${DISTDIR}/git3-src

# @ECLASS-VARIABLE: EGIT_REPO_URI
# @REQUIRED
# @DESCRIPTION:
# URIs to the repository, e.g. git://foo, https://foo. If multiple URIs
# are provided, the eclass will consider them as fallback URIs to try
# if the first URI does not work.
#
# It can be overriden via env using ${PN}_LIVE_REPO variable.
#
# Example:
# @CODE
# EGIT_REPO_URI="git://a/b.git https://c/d.git"
# @CODE

# @ECLASS-VARIABLE: EVCS_OFFLINE
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty, this variable prevents any online operations.

# @ECLASS-VARIABLE: EGIT_BRANCH
# @DEFAULT_UNSET
# @DESCRIPTION:
# The branch name to check out. If unset, the upstream default (HEAD)
# will be used.
#
# It can be overriden via env using ${PN}_LIVE_BRANCH variable.

# @ECLASS-VARIABLE: EGIT_COMMIT
# @DEFAULT_UNSET
# @DESCRIPTION:
# The tag name or commit identifier to check out. If unset, newest
# commit from the branch will be used. If set, EGIT_BRANCH will
# be ignored.
#
# It can be overriden via env using ${PN}_LIVE_COMMIT variable.

# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
# @DESCRIPTION:
# The directory to check the git sources out to.
#
# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}

# @ECLASS-VARIABLE: EGIT_NONSHALLOW
# @DEFAULT_UNSET
# @DESCRIPTION:
# Disable performing shallow fetches/clones. Shallow clones have
# a fair number of limitations. Therefore, if you'd like the eclass to
# perform complete clones instead, set this to a non-null value.
#
# This variable is to be set in make.conf. Ebuilds are not allowed
# to set it.

# @FUNCTION: _git-r3_env_setup
# @INTERNAL
# @DESCRIPTION:
# Set the eclass variables as necessary for operation. This can involve
# setting EGIT_* to defaults or ${PN}_LIVE_* variables.
_git-r3_env_setup() {
	debug-print-function ${FUNCNAME} "$@"

	local esc_pn livevar
	esc_pn=${PN//[-+]/_}

	livevar=${esc_pn}_LIVE_REPO
	EGIT_REPO_URI=${!livevar:-${EGIT_REPO_URI}}
	[[ ${!livevar} ]] \
		&& ewarn "Using ${livevar}, no support will be provided"

	livevar=${esc_pn}_LIVE_BRANCH
	EGIT_BRANCH=${!livevar:-${EGIT_BRANCH}}
	[[ ${!livevar} ]] \
		&& ewarn "Using ${livevar}, no support will be provided"

	livevar=${esc_pn}_LIVE_COMMIT
	EGIT_COMMIT=${!livevar:-${EGIT_COMMIT}}
	[[ ${!livevar} ]] \
		&& ewarn "Using ${livevar}, no support will be provided"

	# Migration helpers. Remove them when git-2 is removed.

	if [[ ${EGIT_SOURCEDIR} ]]; then
		eerror "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR. While updating"
		eerror "your ebuild, please check whether the variable is necessary at all"
		eerror "since the default has been changed from \${S} to \${WORKDIR}/\${P}."
		eerror "Therefore, proper setting of S may be sufficient."
		die "EGIT_SOURCEDIR has been replaced by EGIT_CHECKOUT_DIR."
	fi

	if [[ ${EGIT_MASTER} ]]; then
		eerror "EGIT_MASTER has been removed. Instead, the upstream default (HEAD)"
		eerror "is used by the eclass. Please remove the assignment or use EGIT_BRANCH"
		eerror "as necessary."
		die "EGIT_MASTER has been removed."
	fi

	if [[ ${EGIT_HAS_SUBMODULES} ]]; then
		eerror "EGIT_HAS_SUBMODULES has been removed. The eclass no longer needs"
		eerror "to switch the clone type in order to support submodules and therefore"
		eerror "submodules are detected and fetched automatically."
		die "EGIT_HAS_SUBMODULES is no longer necessary."
	fi

	if [[ ${EGIT_PROJECT} ]]; then
		eerror "EGIT_PROJECT has been removed. Instead, the eclass determines"
		eerror "the local clone path using path in canonical EGIT_REPO_URI."
		eerror "If the current algorithm causes issues for you, please report a bug."
		die "EGIT_PROJECT is no longer necessary."
	fi

	if [[ ${EGIT_BOOTSTRAP} ]]; then
		eerror "EGIT_BOOTSTRAP has been removed. Please create proper src_prepare()"
		eerror "instead."
		die "EGIT_BOOTSTRAP has been removed."
	fi

	if [[ ${EGIT_NOUNPACK} ]]; then
		eerror "EGIT_NOUNPACK has been removed. The eclass no longer calls default"
		eerror "unpack function. If necessary, please declare proper src_unpack()."
		die "EGIT_NOUNPACK has been removed."
	fi
}

# @FUNCTION: _git-r3_set_gitdir
# @USAGE: <repo-uri>
# @INTERNAL
# @DESCRIPTION:
# Obtain the local repository path and set it as GIT_DIR. Creates
# a new repository if necessary.
#
# <repo-uri> may be used to compose the path. It should therefore be
# a canonical URI to the repository.
_git-r3_set_gitdir() {
	debug-print-function ${FUNCNAME} "$@"

	local repo_name=${1#*://*/}

	# strip common prefixes to make paths more likely to match
	# e.g. git://X/Y.git vs https://X/git/Y.git
	# (but just one of the prefixes)
	case "${repo_name}" in
		# cgit can proxy requests to git
		cgit/*) repo_name=${repo_name#cgit/};;
		# pretty common
		git/*) repo_name=${repo_name#git/};;
		# gentoo.org
		gitroot/*) repo_name=${repo_name#gitroot/};;
		# google code, sourceforge
		p/*) repo_name=${repo_name#p/};;
		# kernel.org
		pub/scm/*) repo_name=${repo_name#pub/scm/};;
	esac
	# ensure a .git suffix, same reason
	repo_name=${repo_name%.git}.git
	# now replace all the slashes
	repo_name=${repo_name//\//_}

	local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
	: ${EGIT3_STORE_DIR:=${distdir}/git3-src}

	GIT_DIR=${EGIT3_STORE_DIR}/${repo_name}

	if [[ ! -d ${EGIT3_STORE_DIR} ]]; then
		(
			addwrite /
			mkdir -m0755 -p "${EGIT3_STORE_DIR}"
		) || die "Unable to create ${EGIT3_STORE_DIR}"
	fi

	addwrite "${EGIT3_STORE_DIR}"
	if [[ ! -d ${GIT_DIR} ]]; then
		mkdir "${GIT_DIR}" || die
		git init --bare || die

		# avoid auto-unshallow :)
		touch "${GIT_DIR}"/shallow || die
	fi
}

# @FUNCTION: _git-r3_set_submodules
# @USAGE: <file-contents>
# @INTERNAL
# @DESCRIPTION:
# Parse .gitmodules contents passed as <file-contents>
# as in "$(cat .gitmodules)"). Composes a 'submodules' array that
# contains in order (name, URL, path) for each submodule.
_git-r3_set_submodules() {
	debug-print-function ${FUNCNAME} "$@"

	local data=${1}

	# ( name url path ... )
	submodules=()

	local l
	while read l; do
		# submodule.<path>.path=<path>
		# submodule.<path>.url=<url>
		[[ ${l} == submodule.*.url=* ]] || continue

		l=${l#submodule.}
		local subname=${l%%.url=*}

		submodules+=(
			"${subname}"
			"$(echo "${data}" | git config -f /dev/fd/0 \
				submodule."${subname}".url)"
			"$(echo "${data}" | git config -f /dev/fd/0 \
				submodule."${subname}".path)"
		)
	done < <(echo "${data}" | git config -f /dev/fd/0 -l)
}

# @FUNCTION: git-r3_fetch
# @USAGE: [<repo-uri> [<remote-ref> [<local-id>]]]
# @DESCRIPTION:
# Fetch new commits to the local clone of repository.
#
# <repo-uri> specifies the repository URIs to fetch from, as a space-
# -separated list. The first URI will be used as repository group
# identifier and therefore must be used consistently. When not
# specified, defaults to ${EGIT_REPO_URI}.
#
# <remote-ref> specifies the remote ref or commit id to fetch.
# It is preferred to use 'refs/heads/<branch-name>' for branches
# and 'refs/tags/<tag-name>' for tags. Other options are 'HEAD'
# for upstream default branch and hexadecimal commit SHA1. Defaults
# to the first of EGIT_COMMIT, EGIT_BRANCH or literal 'HEAD' that
# is set to a non-null value.
#
# <local-id> specifies the local branch identifier that will be used to
# locally store the fetch result. It should be unique to multiple
# fetches within the repository that can be performed at the same time
# (including parallel merges). It defaults to ${CATEGORY}/${PN}/${SLOT}.
# This default should be fine unless you are fetching multiple trees
# from the same repository in the same ebuild.
#
# The fetch operation will affect the EGIT_STORE only. It will not touch
# the working copy, nor export any environment variables.
# If the repository contains submodules, they will be fetched
# recursively.
git-r3_fetch() {
	debug-print-function ${FUNCNAME} "$@"

	local repos=( ${1:-${EGIT_REPO_URI}} )
	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}
	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}
	local local_ref=refs/heads/${local_id}/__main__

	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"

	local -x GIT_DIR
	_git-r3_set_gitdir ${repos[0]}

	# try to fetch from the remote
	local r success
	for r in ${repos[@]}; do
		einfo "Fetching ${remote_ref} from ${r} ..."

		local is_branch lookup_ref
		if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
		then
			is_branch=1
			lookup_ref=${remote_ref}
		else
			# ls-remote by commit is going to fail anyway,
			# so we may as well pass refs/tags/ABCDEF...
			lookup_ref=refs/tags/${remote_ref}
		fi

		# first, try ls-remote to see if ${remote_ref} is a real ref
		# and not a commit id. if it succeeds, we can pass ${remote_ref}
		# to 'fetch'. otherwise, we will just fetch everything

		# split on whitespace
		local ref=(
			$(git ls-remote "${r}" "${lookup_ref}")
		)

		# now, another important thing. we may only fetch a remote
		# branch directly to a local branch. Otherwise, we need to fetch
		# the commit and re-create the branch on top of it.

		local ref_param=()
		if [[ ! ${ref[0]} ]]; then
			local EGIT_NONSHALLOW=1
		fi

		if [[ ! -f ${GIT_DIR}/shallow ]]; then
			# if it's a complete repo, fetch it as-is
			:
		elif [[ ${EGIT_NONSHALLOW} ]]; then
			# if it's a shallow clone but we need complete,
			# unshallow it
			ref_param+=( --unshallow )
		else
			# otherwise, just fetch as shallow
			ref_param+=( --depth 1 )
		fi

		if [[ ${ref[0]} ]]; then
			if [[ ${is_branch} ]]; then
				ref_param+=( -f "${remote_ref}:${local_id}/__main__" )
			else
				ref_param+=( "refs/tags/${remote_ref}" )
			fi
		fi

		# if ${remote_ref} is branch or tag, ${ref[@]} will contain
		# the respective commit id. otherwise, it will be an empty
		# array, so the following won't evaluate to a parameter.
		set -- git fetch --no-tags "${r}" "${ref_param[@]}"
		echo "${@}" >&2
		if "${@}"; then
			if [[ ! ${is_branch} ]]; then
				set -- git branch -f "${local_id}/__main__" \
					"${ref[0]:-${remote_ref}}"
				echo "${@}" >&2
				if ! "${@}"; then
					die "Creating branch for ${remote_ref} failed (wrong ref?)."
				fi
			fi

			success=1
			break
		fi
	done
	[[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"

	# recursively fetch submodules
	if git cat-file -e "${local_ref}":.gitmodules &>/dev/null; then
		local submodules
		_git-r3_set_submodules \
			"$(git cat-file -p "${local_ref}":.gitmodules || die)"

		while [[ ${submodules[@]} ]]; do
			local subname=${submodules[0]}
			local url=${submodules[1]}
			local path=${submodules[2]}
			local commit=$(git rev-parse "${local_ref}:${path}")

			if [[ ! ${commit} ]]; then
				die "Unable to get commit id for submodule ${subname}"
			fi

			git-r3_fetch "${url}" "${commit}" "${local_id}/${subname}"

			submodules=( "${submodules[@]:3}" ) # shift
		done
	fi
}

# @FUNCTION: git-r3_checkout
# @USAGE: [<repo-uri> [<checkout-path> [<local-id>]]]
# @DESCRIPTION:
# Check the previously fetched tree to the working copy.
#
# <repo-uri> specifies the repository URIs, as a space-separated list.
# The first URI will be used as repository group identifier
# and therefore must be used consistently with git-r3_fetch.
# The remaining URIs are not used and therefore may be omitted.
# When not specified, defaults to ${EGIT_REPO_URI}.
#
# <checkout-path> specifies the path to place the checkout. It defaults
# to ${EGIT_CHECKOUT_DIR} if set, otherwise to ${WORKDIR}/${P}.
#
# <local-id> needs to specify the local identifier that was used
# for respective git-r3_fetch.
#
# The checkout operation will write to the working copy, and export
# the repository state into the environment. If the repository contains
# submodules, they will be checked out recursively.
git-r3_checkout() {
	debug-print-function ${FUNCNAME} "$@"

	local repos=( ${1:-${EGIT_REPO_URI}} )
	local out_dir=${2:-${EGIT_CHECKOUT_DIR:-${WORKDIR}/${P}}}
	local local_id=${3:-${CATEGORY}/${PN}/${SLOT}}

	local -x GIT_DIR GIT_WORK_TREE
	_git-r3_set_gitdir ${repos[0]}
	GIT_WORK_TREE=${out_dir}
	mkdir -p "${GIT_WORK_TREE}"

	einfo "Checking out ${repos[0]} to ${out_dir} ..."

	if ! git cat-file -e refs/heads/"${local_id}"/__main__
	then
		if [[ ${EVCS_OFFLINE} ]]; then
			die "No local clone of ${repos[0]}. Unable to work with EVCS_OFFLINE."
		else
			die "Logic error: no local clone of ${repos[0]}. git-r3_fetch not used?"
		fi
	fi

	set -- git checkout -f "${local_id}"/__main__ .
	echo "${@}" >&2
	"${@}" || die "git checkout ${local_id}/__main__ failed"

	# diff against previous revision (if any)
	local new_commit_id=$(git rev-parse --verify "${local_id}"/__main__)
	local old_commit_id=$(
		git rev-parse --verify "${local_id}"/__old__ 2>/dev/null
	)

	if [[ ! ${old_commit_id} ]]; then
		echo "GIT NEW branch -->"
		echo "   repository:               ${repos[0]}"
		echo "   at the commit:            ${new_commit_id}"
	else
		echo "GIT update -->"
		echo "   repository:               ${repos[0]}"
		# write out message based on the revisions
		if [[ "${old_commit_id}" != "${new_commit_id}" ]]; then
			echo "   updating from commit:     ${old_commit_id}"
			echo "   to commit:                ${new_commit_id}"

			git --no-pager diff --stat \
				${old_commit_id}..${new_commit_id}
		else
			echo "   at the commit:            ${new_commit_id}"
		fi
	fi
	git branch -f "${local_id}"/{__old__,__main__} || die

	# recursively checkout submodules
	if [[ -f ${GIT_WORK_TREE}/.gitmodules ]]; then
		local submodules
		_git-r3_set_submodules \
			"$(<"${GIT_WORK_TREE}"/.gitmodules)"

		while [[ ${submodules[@]} ]]; do
			local subname=${submodules[0]}
			local url=${submodules[1]}
			local path=${submodules[2]}

			git-r3_checkout "${url}" "${GIT_WORK_TREE}/${path}" \
				"${local_id}/${subname}"

			submodules=( "${submodules[@]:3}" ) # shift
		done
	fi

	# keep this *after* submodules
	export EGIT_DIR=${GIT_DIR}
	export EGIT_VERSION=${new_commit_id}
}

# @FUNCTION: git-r3_peek_remote_ref
# @USAGE: [<repo-uri> [<remote-ref>]]
# @DESCRIPTION:
# Peek the reference in the remote repository and print the matching
# (newest) commit SHA1.
#
# <repo-uri> specifies the repository URIs to fetch from, as a space-
# -separated list. When not specified, defaults to ${EGIT_REPO_URI}.
#
# <remote-ref> specifies the remote ref to peek.  It is preferred to use
# 'refs/heads/<branch-name>' for branches and 'refs/tags/<tag-name>'
# for tags. Alternatively, 'HEAD' may be used for upstream default
# branch. Defaults to the first of EGIT_COMMIT, EGIT_BRANCH or literal
# 'HEAD' that is set to a non-null value.
#
# The operation will be done purely on the remote, without using local
# storage. If commit SHA1 is provided as <remote-ref>, the function will
# fail due to limitations of git protocol.
#
# On success, the function returns 0 and writes hexadecimal commit SHA1
# to stdout. On failure, the function returns 1.
git-r3_peek_remote_ref() {
	debug-print-function ${FUNCNAME} "$@"

	local repos=( ${1:-${EGIT_REPO_URI}} )
	local branch=${EGIT_BRANCH:+refs/heads/${EGIT_BRANCH}}
	local remote_ref=${2:-${EGIT_COMMIT:-${branch:-HEAD}}}

	[[ ${repos[@]} ]] || die "No URI provided and EGIT_REPO_URI unset"

	local r success
	for r in ${repos[@]}; do
		einfo "Peeking ${remote_ref} on ${r} ..." >&2

		local is_branch lookup_ref
		if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
		then
			is_branch=1
			lookup_ref=${remote_ref}
		else
			# ls-remote by commit is going to fail anyway,
			# so we may as well pass refs/tags/ABCDEF...
			lookup_ref=refs/tags/${remote_ref}
		fi

		# split on whitespace
		local ref=(
			$(git ls-remote "${r}" "${lookup_ref}")
		)

		if [[ ${ref[0]} ]]; then
			echo "${ref[0]}"
			return 0
		fi
	done

	return 1
}

git-r3_src_fetch() {
	debug-print-function ${FUNCNAME} "$@"

	[[ ${EVCS_OFFLINE} ]] && return

	if [[ ! ${EGIT3_STORE_DIR} && ${EGIT_STORE_DIR} ]]; then
		ewarn "You have set EGIT_STORE_DIR but not EGIT3_STORE_DIR. Please consider"
		ewarn "setting EGIT3_STORE_DIR for git-r3.eclass. It is recommended to use"
		ewarn "a different directory than EGIT_STORE_DIR to ease removing old clones"
		ewarn "when git-2 eclass becomes deprecated."
	fi

	_git-r3_env_setup
	git-r3_fetch
}

git-r3_src_unpack() {
	debug-print-function ${FUNCNAME} "$@"

	_git-r3_env_setup
	git-r3_src_fetch
	git-r3_checkout
}

# https://bugs.gentoo.org/show_bug.cgi?id=482666
git-r3_pkg_outofdate() {
	debug-print-function ${FUNCNAME} "$@"

	local new_commit_id=$(git-r3_peek_remote_ref)
	ewarn "old: ${EGIT_VERSION}"
	ewarn "new: ${new_commit_id}"
	[[ ${new_commit_id} && ${old_commit_id} ]] || return 2

	[[ ${EGIT_VERSION} != ${new_commit_id} ]]
}

_GIT_R3=1
fi





^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2015-08-08  9:32 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-01 22:07 [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog git-r3.eclass Michal Gorny (mgorny)
  -- strict thread matches above, loose matches on Subject: below --
2015-08-08  9:32 Michal Gorny (mgorny)
2015-07-09 20:21 Michal Gorny (mgorny)
2015-06-22  8:39 Manuel Rueger (mrueg)
2014-07-28 14:13 Michal Gorny (mgorny)
2014-07-28 14:12 Michal Gorny (mgorny)
2014-07-07 14:41 Michal Gorny (mgorny)
2014-06-20 11:40 Michal Gorny (mgorny)
2014-05-23  7:09 Michal Gorny (mgorny)
2014-04-17 20:28 Michal Gorny (mgorny)
2014-03-24 21:32 Michal Gorny (mgorny)
2014-03-03 21:45 Michal Gorny (mgorny)
2014-03-02 11:50 Michal Gorny (mgorny)
2014-03-02 11:50 Michal Gorny (mgorny)
2014-03-02 11:49 Michal Gorny (mgorny)
2014-03-02 11:49 Michal Gorny (mgorny)
2014-03-02 11:48 Michal Gorny (mgorny)
2014-03-02 11:48 Michal Gorny (mgorny)
2014-03-02 11:47 Michal Gorny (mgorny)
2014-03-02 11:47 Michal Gorny (mgorny)
2014-03-02 11:46 Michal Gorny (mgorny)
2014-03-02 11:46 Michal Gorny (mgorny)
2014-03-02 11:45 Michal Gorny (mgorny)
2014-03-02 11:44 Michal Gorny (mgorny)
2014-02-25 13:01 Michal Gorny (mgorny)
2014-02-24  8:43 Michal Gorny (mgorny)
2014-02-23 22:05 Michal Gorny (mgorny)
2013-11-15 23:03 Michal Gorny (mgorny)
2013-10-30 19:21 Michal Gorny (mgorny)
2013-10-27 13:44 Michal Gorny (mgorny)
2013-10-27 13:33 Michal Gorny (mgorny)
2013-10-26  6:19 Michal Gorny (mgorny)
2013-10-13  7:14 Michal Gorny (mgorny)
2013-10-09 17:14 Michal Gorny (mgorny)
2013-10-05 16:48 Michal Gorny (mgorny)
2013-09-27 16:22 Michal Gorny (mgorny)
2013-09-26 21:04 Michal Gorny (mgorny)
2013-09-26 12:38 Michal Gorny (mgorny)
2013-09-25 11:19 Michal Gorny (mgorny)
2013-09-25 10:49 Michal Gorny (mgorny)
2013-09-19  9:42 Michal Gorny (mgorny)
2013-09-19  9:37 Michal Gorny (mgorny)
2013-09-13 15:08 Michal Gorny (mgorny)
2013-09-13 15:04 Michal Gorny (mgorny)
2013-09-09 16:01 Michal Gorny (mgorny)
2013-09-05 22:40 Michal Gorny (mgorny)
2013-09-05 20:24 Michal Gorny (mgorny)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox