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

Diff of /eclass/git.eclass

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

Revision 1.37 Revision 1.38
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.37 2010/01/22 09:32:57 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.38 2010/01/23 15:46:50 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>
61 61
62# @ECLASS-VARIABLE: EGIT_OPTIONS 62# @ECLASS-VARIABLE: EGIT_OPTIONS
63# @DESCRIPTION: 63# @DESCRIPTION:
64# This variable value is passed to clone and fetch. 64# This variable value is passed to clone and fetch.
65: ${EGIT_OPTIONS:=} 65: ${EGIT_OPTIONS:=}
66
67# @ECLASS-VARIABLE: EGIT_MASTER
68# @DESCRIPTION:
69# Variable for specifying master branch.
70# Usefull when upstream don't have master branch.
71: ${EGIT_MASTER:=master}
66 72
67# @ECLASS-VARIABLE: EGIT_REPO_URI 73# @ECLASS-VARIABLE: EGIT_REPO_URI
68# @DESCRIPTION: 74# @DESCRIPTION:
69# URI for the repository 75# URI for the repository
70# e.g. http://foo, git://bar 76# e.g. http://foo, git://bar
273 279
274 oldsha1=$(git rev-parse origin/${EGIT_BRANCH}) 280 oldsha1=$(git rev-parse origin/${EGIT_BRANCH})
275 281
276 debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}" 282 debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
277 # fix branching 283 # fix branching
278 git checkout master 284 git checkout ${EGIT_MASTER}
279 for x in $(git branch |grep -v "* master" |tr '\n' ' '); do 285 for x in $(git branch |grep -v "* master" |tr '\n' ' '); do
280 git branch -D ${x} 286 git branch -D ${x}
281 done 287 done
282 ${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \ 288 ${EGIT_UPDATE_CMD} ${EGIT_OPTIONS} \
283 || die "${EGIT}: can't update from ${EGIT_REPO_URI}." 289 || die "${EGIT}: can't update from ${EGIT_REPO_URI}."

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20