From: Dominique Martinet Date: Wed, 8 Jul 2026 03:33:42 +0000 (+0000) Subject: submodule--helper: accept '-i' shorthand for update --init X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff1da37f58e754a29dff0df03d58b1042a4d5654;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c 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")),