t7409: make sure submodule is initialized and updated in more detail
[gitweb.git] / git-submodule.sh
index dba4d39e1fd3e971336e0d85f24c114c29c4d1fd..9210f3af564356be7cccf02307b2045084b4357a 100755 (executable)
@@ -181,8 +181,11 @@ module_clone()
                rm -f "$gitdir/index"
        else
                mkdir -p "$gitdir_base"
-               git clone $quiet -n ${reference:+"$reference"} \
-                       --separate-git-dir "$gitdir" "$url" "$sm_path" ||
+               (
+                       clear_local_git_env
+                       git clone $quiet -n ${reference:+"$reference"} \
+                               --separate-git-dir "$gitdir" "$url" "$sm_path"
+               ) ||
                die "$(eval_gettext "Clone of '\$url' into submodule path '\$sm_path' failed")"
        fi