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

Diff of /eclass/git.eclass

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

Revision 1.45 Revision 1.46
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.45 2010/07/26 02:22:18 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.46 2010/07/26 02:51:33 reavertm 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>
32# define some nice defaults but only if nothing is set already 32# define some nice defaults but only if nothing is set already
33: ${HOMEPAGE:=http://git-scm.com/} 33: ${HOMEPAGE:=http://git-scm.com/}
34 34
35# @ECLASS-VARIABLE: EGIT_QUIET 35# @ECLASS-VARIABLE: EGIT_QUIET
36# @DESCRIPTION: 36# @DESCRIPTION:
37# Set to nonempty value to supress some eclass messages. 37# Set to non-empty value to supress some eclass messages.
38: ${EGIT_QUIET:=${ESCM_QUIET}} 38: ${EGIT_QUIET:=${ESCM_QUIET}}
39 39
40# @ECLASS-VARIABLE: EGIT_STORE_DIR 40# @ECLASS-VARIABLE: EGIT_STORE_DIR
41# @DESCRIPTION: 41# @DESCRIPTION:
42# Storage directory for git sources. 42# Storage directory for git sources.
43# Can be redefined. 43# Can be redefined.
44[[ -z ${EGIT_STORE_DIR} ]] && EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src" 44[[ -z ${EGIT_STORE_DIR} ]] && EGIT_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/git-src"
45 45
46# @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES 46# @ECLASS-VARIABLE: EGIT_HAS_SUBMODULES
47# @DESCRIPTION: 47# @DESCRIPTION:
48# Set this to nonzero value to enable submodule support (slower). 48# Set this to non-empty value to enable submodule support (slower).
49: ${EGIT_HAS_SUBMODULES:=} 49: ${EGIT_HAS_SUBMODULES:=}
50 50
51# @ECLASS-VARIABLE: EGIT_FETCH_CMD 51# @ECLASS-VARIABLE: EGIT_FETCH_CMD
52# @DESCRIPTION: 52# @DESCRIPTION:
53# Command for cloning the repository. 53# Command for cloning the repository.
144 EGIT_COMMIT="${X}" 144 EGIT_COMMIT="${X}"
145fi 145fi
146 146
147# @ECLASS-VARIABLE: EGIT_REPACK 147# @ECLASS-VARIABLE: EGIT_REPACK
148# @DESCRIPTION: 148# @DESCRIPTION:
149# git eclass will repack objects to save disk space. However this can take a 149# Set to non-empty value to repack objects to save disk space. However this can
150# long time with VERY big repositories. 150# take a long time with VERY big repositories.
151: ${EGIT_REPACK:=} 151: ${EGIT_REPACK:=}
152 152
153# @ECLASS-VARIABLE: EGIT_PRUNE 153# @ECLASS-VARIABLE: EGIT_PRUNE
154# @DESCRIPTION: 154# @DESCRIPTION:
155# git eclass can prune the local clone. This is useful if upstream rewinds and 155# Set to non-empty value to prune loose objects on each fetch. This is useful
156# rebases branches too often. 156# if upstream rewinds and rebases branches often.
157: ${EGIT_PRUNE:=} 157: ${EGIT_PRUNE:=}
158 158
159# @FUNCTION: git_submodules 159# @FUNCTION: git_submodules
160# @DESCRIPTION: 160# @DESCRIPTION:
161# Internal function wrapping the submodule initialisation and update 161# Internal function wrapping the submodule initialisation and update
341 fi 341 fi
342 342
343 pushd "${GIT_DIR}" &> /dev/null 343 pushd "${GIT_DIR}" &> /dev/null
344 if [[ -n ${EGIT_REPACK} ]] || [[ -n ${EGIT_PRUNE} ]]; then 344 if [[ -n ${EGIT_REPACK} ]] || [[ -n ${EGIT_PRUNE} ]]; then
345 ebegin "Garbage collecting the repository" 345 ebegin "Garbage collecting the repository"
346 git gc $(${EGIT_PRUNE} && echo '--prune') 346 local args
347 [[ -n ${EGIT_PRUNE} ]] && args='--prune'
348 git gc ${args}
347 eend $? 349 eend $?
348 fi 350 fi
349 popd &> /dev/null 351 popd &> /dev/null
350 352
351 # export the git version 353 # export the git version

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

  ViewVC Help
Powered by ViewVC 1.1.20