Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 29 Nov 2015 10:03:46
Message-Id: 1448791397.08aa7c8e5c5add6922816f8354669be87351630c.mgorny@gentoo
1 commit: 08aa7c8e5c5add6922816f8354669be87351630c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 26 13:18:16 2015 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 29 10:03:17 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08aa7c8e
7
8 git-r3.eclass: Accept any ref rather than refs/heads/* only
9
10 Fixes: https://bugs.gentoo.org/show_bug.cgi?id=556822
11
12 eclass/git-r3.eclass | 6 +++---
13 1 file changed, 3 insertions(+), 3 deletions(-)
14
15 diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
16 index faee458..8b5ffd5 100644
17 --- a/eclass/git-r3.eclass
18 +++ b/eclass/git-r3.eclass
19 @@ -581,8 +581,8 @@ git-r3_fetch() {
20 if [[ ${remote_ref} == HEAD ]]; then
21 # HEAD
22 fetch_l=HEAD
23 - elif [[ ${remote_ref} == refs/heads/* ]]; then
24 - # regular branch
25 + elif [[ ${remote_ref} == refs/* ]]; then
26 + # regular branch, tag or some other explicit ref
27 fetch_l=${remote_ref}
28 else
29 # tag or commit id...
30 @@ -919,7 +919,7 @@ git-r3_peek_remote_ref() {
31 einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." >&2
32
33 local lookup_ref
34 - if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
35 + if [[ ${remote_ref} == refs/* || ${remote_ref} == HEAD ]]
36 then
37 lookup_ref=${remote_ref}
38 else