@leroysheep / MovieWebApp / commits / ff1da37f58

submodule--helper: accept '-i' shorthand for update --init

commit 3ad0ba722744 ("git-submodule.sh: improve variables readability") made `git submodules update -i` pass `-i` as is to submodule--helper, but it fails with `error: unknown switch `i'` because the helper does not accept the short option. All other short options supported by git-submodule.sh are properly handle in the helper, so also add the alias for --init Fixes: 3ad0ba722744 ("git-submodule.sh: improve variables readability") Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Dominique Martinet committed Jul 8, 2026 at 03:33 UTC ff1da37f58e754a29dff0df03d58b1042a4d5654
1 file changed +1 -1
builtin/submodule--helper.c
+1 -1
index 1cc82a134d..3ec8bf5053 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -2990,7 +2990,7 @@ static int module_update(int argc, const char **argv, const char *prefix, struct option module_update_options[] = { OPT__SUPER_PREFIX(&opt.super_prefix), OPT__FORCE(&opt.force, N_("force checkout updates"), 0), - OPT_BOOL(0, "init", &opt.init, + OPT_BOOL('i', "init", &opt.init, N_("initialize uninitialized submodules before update")), OPT_BOOL(0, "remote", &opt.remote, N_("use SHA-1 of submodule's remote tracking branch")),