Merge branch 'sb/submodule-core-worktree'
"git submodule" did not correctly adjust core.worktree setting that indicates whether/where a submodule repository has its associated working tree across various state transitions, which has been corrected. * sb/submodule-core-worktree: submodule deinit: unset core.worktree submodule: ensure core.worktree is set after update submodule: unset core.worktree if no working tree is present
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user