diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-07-18 12:20:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-18 12:20:28 -0700 |
commit | 7e25437d35a70791b345872af202eabfb3e1a8bc (patch) | |
tree | 1d8dcdc9814e310d8be656b11d76885c37191185 /git-submodule.sh | |
parent | 00624d608cc69bd62801c93e74d1ea7a7ddd6598 (diff) | |
parent | 984cd77ddbf0eea7371a18ad7124120473b6bb2d (diff) | |
download | git-7e25437d35a70791b345872af202eabfb3e1a8bc.tar.gz |
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
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 5f9d9f6ea3..8b5ad59bde 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -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 |