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

Diff of /eclass/git-r3.eclass

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

Revision 1.24 Revision 1.25
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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-r3.eclass,v 1.24 2014/02/23 22:05:55 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.25 2014/02/24 08:43:34 mgorny Exp $
4 4
5# @ECLASS: git-r3.eclass 5# @ECLASS: git-r3.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
328 git fetch --prune "${r}" 328 git fetch --prune "${r}"
329 # mirror the remote branches as local branches 329 # mirror the remote branches as local branches
330 "refs/heads/*:refs/heads/*" 330 "refs/heads/*:refs/heads/*"
331 # pull tags explicitly in order to prune them properly 331 # pull tags explicitly in order to prune them properly
332 "refs/tags/*:refs/tags/*" 332 "refs/tags/*:refs/tags/*"
333 # notes in case something needs them
334 "refs/notes/*:refs/notes/*"
333 ) 335 )
334 336
335 set -- "${fetch_command[@]}" 337 set -- "${fetch_command[@]}"
336 echo "${@}" >&2 338 echo "${@}" >&2
337 if "${@}"; then 339 if "${@}"; then
445 set -- git clone --quiet --shared --no-checkout "${GIT_DIR}" "${out_dir}"/ 447 set -- git clone --quiet --shared --no-checkout "${GIT_DIR}" "${out_dir}"/
446 echo "${@}" >&2 448 echo "${@}" >&2
447 "${@}" || die "git clone (for checkout) failed" 449 "${@}" || die "git clone (for checkout) failed"
448 450
449 git-r3_sub_checkout() { 451 git-r3_sub_checkout() {
452 local orig_repo=${GIT_DIR}
450 local -x GIT_DIR=${out_dir}/.git 453 local -x GIT_DIR=${out_dir}/.git
451 local -x GIT_WORK_TREE=${out_dir} 454 local -x GIT_WORK_TREE=${out_dir}
455
456 # pull notes
457 git fetch "${orig_repo}" "refs/notes/*:refs/notes/*" || die
452 458
453 set -- git checkout --quiet 459 set -- git checkout --quiet
454 if [[ ${remote_ref} ]]; then 460 if [[ ${remote_ref} ]]; then
455 set -- "${@}" "${remote_ref#refs/heads/}" 461 set -- "${@}" "${remote_ref#refs/heads/}"
456 else 462 else

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

  ViewVC Help
Powered by ViewVC 1.1.20