Merge branch 'bc/object-id'
[gitweb.git] / git-submodule.sh
index 5f9d9f6ea3713be458c006501c503d8d660e9ddf..8b5ad59bdee39eba4fc56b28d6771a291dac55f0 100755 (executable)
@@ -577,6 +577,11 @@ cmd_update()
                        die "$(eval_gettext "Unable to find current \${remote_name}/\${branch} revision in submodule path '\$sm_path'")"
                fi
 
+               if ! $(git config -f "$(git rev-parse --git-common-dir)/modules/$name/config" core.worktree) 2>/dev/null
+               then
+                       git submodule--helper connect-gitdir-workingtree "$name" "$sm_path"
+               fi
+
                if test "$subsha1" != "$sha1" || test -n "$force"
                then
                        subforce=$force