commit:     838b52b4a3e44aaa2b86db7c68803d0018cfba98
Author:     Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Mon Mar 25 15:15:17 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Apr  1 09:36:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=838b52b4

git-r3.eclass: Add the ability to checkout ignored submodules.

If the submodules is specified in EGIT_SUBMODULES then it will ignore
the "none" check.

Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35911
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

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

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index a498bb8a5563..565f6ada8382 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -429,6 +429,7 @@ _git-r3_set_submodules() {
 
                l=${l#submodule.}
                local subname=${l%%.url=*}
+               local is_manually_specified=
 
                # filter out on EGIT_SUBMODULES
                if declare -p EGIT_SUBMODULES &>/dev/null; then
@@ -449,13 +450,14 @@ _git-r3_set_submodules() {
                                continue
                        else
                                einfo "Using submodule ${parent_path}${subname}"
+                               is_manually_specified=1
                        fi
                fi
 
                # skip modules that have 'update = none', bug #487262.
                local upd=$(echo "${data}" | git config -f /dev/fd/0 \
                        submodule."${subname}".update)
-               [[ ${upd} == none ]] && continue
+               [[ ${upd} == none && ! ${is_manually_specified} ]] && continue
 
                # https://github.com/git/git/blob/master/refs.c#L31
                # we are more restrictive than git itself but that should not

Reply via email to