submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree
[gitweb.git] / git-submodule.sh
index 5f9d9f6ea3713be458c006501c503d8d660e9ddf..19d010eac069a043dd97754f51c6c98fc6e1079a 100755 (executable)
@@ -531,9 +531,11 @@ cmd_update()
                "$@" || echo "#unmatched" $?
        } | {
        err=
-       while read -r mode sha1 stage just_cloned sm_path
+       while read -r quickabort sha1 just_cloned sm_path
        do
-               die_if_unmatched "$mode" "$sha1"
+               die_if_unmatched "$quickabort" "$sha1"
+
+               git submodule--helper ensure-core-worktree "$sm_path"
 
                name=$(git submodule--helper name "$sm_path") || exit
                if ! test -z "$update"
@@ -627,7 +629,7 @@ cmd_update()
                                must_die_on_failure=yes
                                ;;
                        *)
-                               die "$(eval_gettext "Invalid update mode '$update_module' for submodule '$name'")"
+                               die "$(eval_gettext "Invalid update mode '$update_module' for submodule path '$path'")"
                        esac
 
                        if (sanitize_submodule_env; cd "$sm_path" && $command "$sha1")