summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorBo Ørsted Andresen <zlin@gentoo.org>2008-06-16 07:51:00 +0000
committerBo Ørsted Andresen <zlin@gentoo.org>2008-06-16 07:51:00 +0000
commita3b71ae0bdbbbf52a06c57e39920bf5f44d93c91 (patch)
treefd59055f91bda97a0a4c5409dbd1109929af7204 /eclass
parentstable x86, bug 226741 (diff)
downloadgentoo-2-a3b71ae0bdbbbf52a06c57e39920bf5f44d93c91.tar.gz
gentoo-2-a3b71ae0bdbbbf52a06c57e39920bf5f44d93c91.tar.bz2
gentoo-2-a3b71ae0bdbbbf52a06c57e39920bf5f44d93c91.zip
Export GIT_WORK_TREE and use git checkout to get a work tree in S.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/git.eclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/git.eclass b/eclass/git.eclass
index 22b1d8cdeae9..f5c36e0234e6 100644
--- a/eclass/git.eclass
+++ b/eclass/git.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.12 2008/06/15 17:47:57 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.13 2008/06/16 07:51:00 zlin Exp $
## --------------------------------------------------------------------------- #
# subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
@@ -190,7 +190,9 @@ git_fetch() {
debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
+ mkdir -p "${S}"
export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
+ export GIT_WORK_TREE="${S}"
if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
# first clone
@@ -235,8 +237,7 @@ git_fetch() {
einfo " committish: ${EGIT_TREE}"
# export to the ${WORKDIR}
- mkdir -p "${S}"
- git archive --format=tar ${EGIT_TREE} | ( cd "${S}" ; tar xf - )
+ git checkout -f ${EGIT_TREE}
echo ">>> Unpacked to ${S}"