summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2018-09-08 00:09:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-08 02:05:20 (GMT)
commitf178c13fdac42763a7aa58bf260aa67d9f4393ec (patch)
treeae27a5d9cc99eca51eb93c8769270fbe67737365 /git-submodule.sh
parentc05048d43925ab8edcb36663752c2b4541911231 (diff)
downloadgit-f178c13fdac42763a7aa58bf260aa67d9f4393ec.zip
git-f178c13fdac42763a7aa58bf260aa67d9f4393ec.tar.gz
git-f178c13fdac42763a7aa58bf260aa67d9f4393ec.tar.bz2
Revert "Merge branch 'sb/submodule-core-worktree'"
This reverts commit 7e25437d35a70791b345872af202eabfb3e1a8bc, reversing changes made to 00624d608cc69bd62801c93e74d1ea7a7ddd6598. v2.19.0-rc0~165^2~1 (submodule: ensure core.worktree is set after update, 2018-06-18) assumes an "absorbed" submodule layout, where the submodule's Git directory is in the superproject's .git/modules/ directory and .git in the submodule worktree is a .git file pointing there. In particular, it uses $GIT_DIR/modules/$name to find the submodule to find out whether it already has core.worktree set, and it uses connect_work_tree_and_git_dir if not, resulting in fatal: could not open sub/.git for writing The context behind that patch: v2.19.0-rc0~165^2~2 (submodule: unset core.worktree if no working tree is present, 2018-06-12) unsets core.worktree when running commands like "git checkout --recurse-submodules" to switch to a branch without the submodule. If a user then uses "git checkout --no-recurse-submodules" to switch back to a branch with the submodule and runs "git submodule update", this patch is needed to ensure that commands using the submodule directly are aware of the path to the worktree. It is late in the release cycle, so revert the whole 3-patch series. We can try again later for 2.20. Reported-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Helped-by: Stefan Beller <sbeller@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh5
1 files changed, 0 insertions, 5 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index f7fd803..1cb2c0a 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -580,11 +580,6 @@ 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