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

Diff of /eclass/git.eclass

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

Revision 1.34 Revision 1.35
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.34 2010/01/13 09:51:53 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.35 2010/01/13 20:04:19 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 --all" 55EGIT_UPDATE_CMD="git pull -f -u"
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"
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: \"${GIT_DIR}\"" 302 ${elogcmd} " storage directory: \"${GIT_DIR}\""
303 303
304 # unpack to the ${S}
304 popd &> /dev/null 305 popd &> /dev/null
305
306 # unpack to the ${S}
307 # "${EGIT_REPO_URI}"
308 debug-print "git clone -l -s -n \"${GIT_DIR}\" \"${S}\"" 306 debug-print "git clone -l \"${GIT_DIR}\" \"${S}\""
309 git clone -l -s -n "${GIT_DIR}" "${S}" 307 git clone -l "${GIT_DIR}" "${S}"
310 308
311 # set correct branch and the tree ebuild specified 309 # set correct branch and the tree ebuild specified
312 pushd "${S}" > /dev/null 310 pushd "${S}" > /dev/null
313 local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH} 311 local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
314 if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then 312 if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
315 branchname=tree-${EGIT_COMMIT} 313 branchname=tree-${EGIT_COMMIT}
316 src=${EGIT_COMMIT} 314 src=${EGIT_COMMIT}
317 fi 315 fi
318 debug-print "git checkout -b ${branchname} ${src}" 316 debug-print "git checkout -b ${branchname} ${src}"
319 git checkout -b ${branchname} ${src} 2>&1 > /dev/null 317 git checkout -b ${branchname} ${src} 2>&1 > /dev/null
320
321 git_sumbodules 318 git_sumbodules
322 popd > /dev/null 319 popd > /dev/null
323 320
324 unset branchname src 321 unset branchname src
325 322

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

  ViewVC Help
Powered by ViewVC 1.1.20