It was already proven before that trying to fetch those with '--depth'
result in sandbox violations due to git writing temporary files
in the repository. Instead, fetch them as 'single'.
---
 eclass/git-r3.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 37138a9..7ab94d2 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -507,9 +507,13 @@ git-r3_fetch() {
                fi
 
                if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
-                       # use '--depth 1' when fetching a new branch
-                       if [[ ! $(git rev-parse --quiet --verify "${fetch_r}") 
]]
+                       if _git-r3_is_local_repo; then
+                               # '--depth 1' causes sandbox violations with 
local repos
+                               # bug #491260
+                               local EGIT_CLONE_TYPE=single
+                       elif [[ ! $(git rev-parse --quiet --verify 
"${fetch_r}") ]]
                        then
+                               # use '--depth 1' when fetching a new branch
                                fetch_command+=( --depth 1 )
                        fi
                else # non-shallow mode
-- 
1.9.0


Reply via email to