/[gentoo-x86]/eclass/git.eclass
Gentoo

Diff of /eclass/git.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.33 Revision 1.34
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.33 2009/12/29 17:18:16 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.34 2010/01/13 09:51:53 scarabeus Exp $
4 4
5# @ECLASS: git.eclass 5# @ECLASS: git.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Tomas Chvatal <scarabeus@gentoo.org> 7# Tomas Chvatal <scarabeus@gentoo.org>
8# Donnie Berkholz <dberkholz@gentoo.org> 8# Donnie Berkholz <dberkholz@gentoo.org>
50: ${EGIT_FETCH_CMD:="git clone"} 50: ${EGIT_FETCH_CMD:="git clone"}
51 51
52# @ECLASS-VARIABLE: EGIT_UPDATE_CMD 52# @ECLASS-VARIABLE: EGIT_UPDATE_CMD
53# @DESCRIPTION: 53# @DESCRIPTION:
54# Git fetch command. 54# Git fetch command.
55EGIT_UPDATE_CMD="git pull -f -u" 55EGIT_UPDATE_CMD="git pull -f -u --all"
56 56
57# @ECLASS-VARIABLE: EGIT_DIFFSTAT_CMD 57# @ECLASS-VARIABLE: EGIT_DIFFSTAT_CMD
58# @DESCRIPTION: 58# @DESCRIPTION:
59# Git command for diffstat. 59# Git command for diffstat.
60EGIT_DIFFSTAT_CMD="git --no-pager diff --stat" 60EGIT_DIFFSTAT_CMD="git --no-pager diff --stat"
297 # export the git version 297 # export the git version
298 export EGIT_VERSION="${cursha1}" 298 export EGIT_VERSION="${cursha1}"
299 299
300 [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] && elog " commit: ${EGIT_COMMIT}" 300 [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]] && elog " commit: ${EGIT_COMMIT}"
301 ${elogcmd} " branch: ${EGIT_BRANCH}" 301 ${elogcmd} " branch: ${EGIT_BRANCH}"
302 ${elogcmd} " storage directory: \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\"" 302 ${elogcmd} " storage directory: \"${GIT_DIR}\""
303
304 popd &> /dev/null
303 305
304 # unpack to the ${S} 306 # unpack to the ${S}
305 popd &> /dev/null 307 # "${EGIT_REPO_URI}"
306 debug-print "cp -aR \"${GIT_DIR}\" \"${S}\"" 308 debug-print "git clone -l -s -n \"${GIT_DIR}\" \"${S}\""
307 git clone "${GIT_DIR}" "${S}" 309 git clone -l -s -n "${GIT_DIR}" "${S}"
308 310
309 # set correct branch and the tree ebuild specified 311 # set correct branch and the tree ebuild specified
310 pushd "${S}" > /dev/null 312 pushd "${S}" > /dev/null
311 local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH} 313 local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
312 if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then 314 if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
313 branchname=tree-${EGIT_COMMIT} 315 branchname=tree-${EGIT_COMMIT}
314 src=${EGIT_COMMIT} 316 src=${EGIT_COMMIT}
315 fi 317 fi
316 debug-print "git checkout -b ${branchname} ${src}" 318 debug-print "git checkout -b ${branchname} ${src}"
317 git checkout -b ${branchname} ${src} 2>&1 > /dev/null 319 git checkout -b ${branchname} ${src} 2>&1 > /dev/null
320
318 git_sumbodules 321 git_sumbodules
319 popd > /dev/null 322 popd > /dev/null
320 323
321 unset branchname src 324 unset branchname src
322 325

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.20