commit:     9dd95690e6f4ff62d66595eb2e0f78c223b32a3e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  5 14:35:19 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb  5 14:37:27 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dd95690

git-r3.eclass: Filter out /. components from submodule refs, #572312

 eclass/git-r3.eclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 42d6dbf..957ff08 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -362,8 +362,13 @@ _git-r3_set_submodules() {
                        submodule."${subname}".update)
                [[ ${upd} == none ]] && continue
 
+               # https://github.com/git/git/blob/master/refs.c#L39
+               # for now, we just filter /. because of #572312
+               local enc_subname=${subname//\/.//_}
+               [[ ${enc_subname} == .* ]] && enc_subname=_${enc_subname#.}
+
                submodules+=(
-                       "${subname}"
+                       "${enc_subname}"
                        "$(echo "${data}" | git config -f /dev/fd/0 \
                                submodule."${subname}".url || die)"
                        "$(echo "${data}" | git config -f /dev/fd/0 \

Reply via email to