diff options
author | Michał Górny <mgorny@gentoo.org> | 2016-02-05 15:35:19 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-02-05 15:37:27 +0100 |
commit | 9dd95690e6f4ff62d66595eb2e0f78c223b32a3e (patch) | |
tree | e0046cb0c1954b1ba9c705980936418230381b30 /eclass/git-r3.eclass | |
parent | sys-auth/realtime-base: update homepage, bug #568680 (diff) | |
download | gentoo-9dd95690e6f4ff62d66595eb2e0f78c223b32a3e.tar.gz gentoo-9dd95690e6f4ff62d66595eb2e0f78c223b32a3e.tar.bz2 gentoo-9dd95690e6f4ff62d66595eb2e0f78c223b32a3e.zip |
git-r3.eclass: Filter out /. components from submodule refs, #572312
Diffstat (limited to 'eclass/git-r3.eclass')
-rw-r--r-- | eclass/git-r3.eclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index 42d6dbf6b326..957ff08c296b 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 \ |