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

Diff of /eclass/git.eclass

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

Revision 1.25 Revision 1.26
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.25 2009/04/14 21:46:45 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.26 2009/05/09 15:10:47 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>
196 ${elogcmd} " repository: ${EGIT_REPO_URI}" 196 ${elogcmd} " repository: ${EGIT_REPO_URI}"
197 197
198 ${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \ 198 ${EGIT_FETCH_CMD} ${EGIT_OPTIONS} "${EGIT_REPO_URI}" ${EGIT_PROJECT} \
199 || die "${EGIT}: can't fetch from ${EGIT_REPO_URI}." 199 || die "${EGIT}: can't fetch from ${EGIT_REPO_URI}."
200 200
201 oldsha1=$(git rev-parse ${EGIT_BRANCH}) 201 cursha1=$(git rev-parse ${EGIT_BRANCH})
202 ${elogcmd} " at the commit: ${oldsha1}" 202 ${elogcmd} " at the commit: ${cursha1}"
203
204 # We use --bare cloning, so git doesn't do this for us. 203 # We use --bare cloning, so git doesn't do this for us.
205 git config remote.origin.url "${EGIT_REPO_URI}" 204 git config remote.origin.url "${EGIT_REPO_URI}"
206 elif [[ -n ${EGIT_OFFLINE} ]] ; then 205 elif [[ -n ${EGIT_OFFLINE} ]] ; then
207 oldsha1=$(git rev-parse ${EGIT_BRANCH}) 206 cursha1=$(git rev-parse ${EGIT_BRANCH})
208 ${elogcmd} "GIT offline update -->" 207 ${elogcmd} "GIT offline update -->"
209 ${elogcmd} " repository: ${EGIT_REPO_URI}" 208 ${elogcmd} " repository: ${EGIT_REPO_URI}"
210 ${elogcmd} " at the commit: ${oldsha1}" 209 ${elogcmd} " at the commit: ${cursha1}"
211 else 210 else
212 # Git urls might change, so unconditionally set it here 211 # Git urls might change, so unconditionally set it here
213 git config remote.origin.url "${EGIT_REPO_URI}" 212 git config remote.origin.url "${EGIT_REPO_URI}"
214 213
215 # fetch updates 214 # fetch updates
236 if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then 235 if ${EGIT_REPACK} || ${EGIT_PRUNE} ; then
237 ebegin "Garbage collecting the repository" 236 ebegin "Garbage collecting the repository"
238 git gc $(${EGIT_PRUNE} && echo '--prune') 237 git gc $(${EGIT_PRUNE} && echo '--prune')
239 eend $? 238 eend $?
240 fi 239 fi
240
241 # export the git version
242 export EGIT_VERSION="${cursha1}"
241 243
242 [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]] && elog " tree: ${EGIT_TREE}" 244 [[ ${EGIT_TREE} != ${EGIT_BRANCH} ]] && elog " tree: ${EGIT_TREE}"
243 ${elogcmd} " branch: ${EGIT_BRANCH}" 245 ${elogcmd} " branch: ${EGIT_BRANCH}"
244 ${elogcmd} " storage directory: \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\"" 246 ${elogcmd} " storage directory: \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\""
245 247

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20