aboutsummaryrefslogtreecommitdiffstats
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-18 17:06:07 -0700
committerJunio C Hamano <gitster@pobox.com>2018-06-19 09:28:13 -0700
commite98317508c02b7cc65bf5b28f27788e47096b166 (patch)
tree49f33af085e1af8f0c3e5f7c772c2515d2741f57 /git-submodule.sh
parent4fa4f90ccd85842e1187e5a5daf4633dceaab779 (diff)
downloadgit-e98317508c02b7cc65bf5b28f27788e47096b166.tar.gz
submodule: ensure core.worktree is set after update
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 78073cd87d..6bd0db02b3 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -615,6 +615,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