This is required to support submodules transparently since they always fetch by commit hash. --- eclass/git-r3.eclass | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index c9c2da5..08b8ebb 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -449,13 +449,18 @@ git-r3_fetch() { # tag fetch_l=refs/tags/${remote_ref} else - # commit, so we need to fetch the branch - # and guess where it takes us... + # commit + # so we need to fetch the branch if [[ ${branch} ]]; then fetch_l=${branch} else fetch_l=HEAD fi + + # fetching by commit in shallow mode? can't do. + if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then + local EGIT_CLONE_TYPE=single + fi fi fi -- 1.8.3.2