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

Diff of /eclass/git-2.eclass

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

Revision 1.1 Revision 1.3
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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/git-2.eclass,v 1.1 2011/04/20 10:56:27 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.3 2011/04/23 10:21:11 scarabeus Exp $
4 4
5# @ECLASS: git-2.eclass 5# @ECLASS: git-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Tomas Chvatal <scarabeus@gentoo.org> 7# Tomas Chvatal <scarabeus@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
304 EGIT_REPO_URI_SELECTED="" 304 EGIT_REPO_URI_SELECTED=""
305 for repo_uri in ${EGIT_REPO_URI}; do 305 for repo_uri in ${EGIT_REPO_URI}; do
306 # git urls might change, so reset it 306 # git urls might change, so reset it
307 git config remote.origin.url "${repo_uri}" 307 git config remote.origin.url "${repo_uri}"
308 308
309 debug-print "${EGIT_UPDATE_CMD} ${EGIT_OPTIONS}" 309 debug-print "${EGIT_UPDATE_CMD}"
310 ${EGIT_UPDATE_CMD} > /dev/null 310 ${EGIT_UPDATE_CMD} > /dev/null
311 if [[ $? -eq 0 ]]; then 311 if [[ $? -eq 0 ]]; then
312 # global variable containing the repo_name we will be using 312 # global variable containing the repo_name we will be using
313 debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\"" 313 debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
314 EGIT_REPO_URI_SELECTED="${repo_uri}" 314 EGIT_REPO_URI_SELECTED="${repo_uri}"
477 # set various options to work with both targets 477 # set various options to work with both targets
478 if [[ ${target} == bare ]]; then 478 if [[ ${target} == bare ]]; then
479 debug-print "${FUNCNAME}: working in bare repository for \"${EGIT_DIR}\"" 479 debug-print "${FUNCNAME}: working in bare repository for \"${EGIT_DIR}\""
480 EGIT_OPTIONS+=" --bare" 480 EGIT_OPTIONS+=" --bare"
481 MOVE_COMMAND="git clone -l -s -n ${EGIT_DIR// /\\ }" 481 MOVE_COMMAND="git clone -l -s -n ${EGIT_DIR// /\\ }"
482 EGIT_UPDATE_CMD="git fetch -f -u origin ${EGIT_BRANCH}:${EGIT_BRANCH}" 482 EGIT_UPDATE_CMD="git fetch -t -f -u origin ${EGIT_BRANCH}:${EGIT_BRANCH}"
483 UPSTREAM_BRANCH="${EGIT_BRANCH}" 483 UPSTREAM_BRANCH="${EGIT_BRANCH}"
484 else 484 else
485 debug-print "${FUNCNAME}: working in bare repository for non-bare \"${EGIT_DIR}\"" 485 debug-print "${FUNCNAME}: working in bare repository for non-bare \"${EGIT_DIR}\""
486 MOVE_COMMAND="cp -pPR ." 486 MOVE_COMMAND="cp -pPR ."
487 EGIT_UPDATE_CMD="git pull -f -u ${EGIT_OPTIONS}" 487 EGIT_UPDATE_CMD="git pull -f -u ${EGIT_OPTIONS}"

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20