Merge branch 'sb/submodule-abort-update-upon-config-failure'
authorJunio C Hamano <gitster@pobox.com>
Thu, 7 Feb 2019 06:05:25 +0000 (22:05 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Feb 2019 06:05:25 +0000 (22:05 -0800)
"git submodule update" learned to abort early when core.worktree
for the submodule is not set correctly to prevent spreading damage.

* sb/submodule-abort-update-upon-config-failure:
git-submodule: abort if core.worktree could not be set correctly

git-submodule.sh
index 5e608f8bad305fea40e9063b854bf1be24ebd448..02a0d728174a0201c966abd73299d03c198d03b4 100755 (executable)
@@ -548,7 +548,7 @@ cmd_update()
        do
                die_if_unmatched "$quickabort" "$sha1"
 
-               git submodule--helper ensure-core-worktree "$sm_path"
+               git submodule--helper ensure-core-worktree "$sm_path" || exit 1
 
                update_module=$(git submodule--helper update-module-mode $just_cloned "$sm_path" $update)