summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2010-01-23 15:46:50 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2010-01-23 15:46:50 +0000
commit8dc4a96ce6fba0471d388e9d5da7613e374af026 (patch)
tree7bec79e3e12849ea3821a0b19a7133c7594c71eb /eclass/git.eclass
parentstable ppc, bug 296125 (diff)
downloadgentoo-2-8dc4a96ce6fba0471d388e9d5da7613e374af026.tar.gz
gentoo-2-8dc4a96ce6fba0471d388e9d5da7613e374af026.tar.bz2
gentoo-2-8dc4a96ce6fba0471d388e9d5da7613e374af026.zip
Introduce EGIT_MASTER to specify master branch. Some upstreams dont have master called master :]
Diffstat (limited to 'eclass/git.eclass')
-rw-r--r--eclass/git.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/git.eclass b/eclass/git.eclass
index 651925dfce00..25c09037adfe 100644
--- a/eclass/git.eclass
+++ b/eclass/git.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.37 2010/01/22 09:32:57 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git.eclass,v 1.38 2010/01/23 15:46:50 scarabeus Exp $
# @ECLASS: git.eclass
# @MAINTAINER:
@@ -64,6 +64,12 @@ EGIT_DIFFSTAT_CMD="git --no-pager diff --stat"
# This variable value is passed to clone and fetch.
: ${EGIT_OPTIONS:=}
+# @ECLASS-VARIABLE: EGIT_MASTER
+# @DESCRIPTION:
+# Variable for specifying master branch.
+# Usefull when upstream don't have master branch.
+: ${EGIT_MASTER:=master}
+
# @ECLASS-VARIABLE: EGIT_REPO_URI
# @DESCRIPTION:
# URI for the repository
@@ -275,7 +281,7 @@ git_fetch() {
debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}"
# fix branching
- git checkout master
+ git checkout ${EGIT_MASTER}
for x in $(git branch |grep -v "* master" |tr '\n' ' '); do
git branch -D ${x}
done