summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-02-05 15:35:19 +0100
committerMichał Górny <mgorny@gentoo.org>2016-02-05 15:37:27 +0100
commit9dd95690e6f4ff62d66595eb2e0f78c223b32a3e (patch)
treee0046cb0c1954b1ba9c705980936418230381b30 /eclass/git-r3.eclass
parentsys-auth/realtime-base: update homepage, bug #568680 (diff)
downloadgentoo-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.eclass7
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 \