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 <jrnieder@gmail.com> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
This commit is contained in:

committed by
Johannes Schindelin

parent
4cfc47de25
commit
c154745074
@ -1482,6 +1482,8 @@ static void determine_submodule_update_strategy(struct repository *r,
|
|||||||
die(_("Invalid update mode '%s' configured for submodule path '%s'"),
|
die(_("Invalid update mode '%s' configured for submodule path '%s'"),
|
||||||
val, path);
|
val, path);
|
||||||
} else if (sub->update_strategy.type != SM_UPDATE_UNSPECIFIED) {
|
} else if (sub->update_strategy.type != SM_UPDATE_UNSPECIFIED) {
|
||||||
|
if (sub->update_strategy.type == SM_UPDATE_COMMAND)
|
||||||
|
BUG("how did we read update = !command from .gitmodules?");
|
||||||
out->type = sub->update_strategy.type;
|
out->type = sub->update_strategy.type;
|
||||||
out->command = sub->update_strategy.command;
|
out->command = sub->update_strategy.command;
|
||||||
} else
|
} else
|
||||||
|
Reference in New Issue
Block a user