/[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.4 Revision 1.5
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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.4 2013/09/13 15:04:36 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.5 2013/09/13 15:08:37 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.
396 # and not a commit id. if it succeeds, we can pass ${remote_ref} 396 # and not a commit id. if it succeeds, we can pass ${remote_ref}
397 # to 'fetch'. otherwise, we will just fetch everything 397 # to 'fetch'. otherwise, we will just fetch everything
398 398
399 # split on whitespace 399 # split on whitespace
400 local ref=( 400 local ref=(
401 $(git ls-remote "${r}" "${lookup_ref}") 401 $(git ls-remote "${r}" "${lookup_ref}" || echo __FAIL__)
402 ) 402 )
403
404 # normally, ref[0] is a hash, so we can do magic strings here
405 [[ ${ref[0]} == __FAIL__ ]] && continue
403 406
404 local nonshallow=${EGIT_NONSHALLOW} 407 local nonshallow=${EGIT_NONSHALLOW}
405 local ref_param=() 408 local ref_param=()
406 if [[ ! ${ref[0]} ]]; then 409 if [[ ! ${ref[0]} ]]; then
407 nonshallow=1 410 nonshallow=1

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20