Skip to content

Commit c154745

Browse files
jrndscho
authored andcommitted
submodule: defend against submodule.update = !command in .gitmodules
In v2.15.4, we started to reject `submodule.update` settings in `.gitmodules`. Let's raise a BUG if it somehow still made it through from anywhere but the Git config. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 4cfc47d commit c154745

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/submodule--helper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,8 @@ static void determine_submodule_update_strategy(struct repository *r,
14821482
die(_("Invalid update mode '%s' configured for submodule path '%s'"),
14831483
val, path);
14841484
} else if (sub->update_strategy.type != SM_UPDATE_UNSPECIFIED) {
1485+
if (sub->update_strategy.type == SM_UPDATE_COMMAND)
1486+
BUG("how did we read update = !command from .gitmodules?");
14851487
out->type = sub->update_strategy.type;
14861488
out->command = sub->update_strategy.command;
14871489
} else

0 commit comments

Comments
 (0)