Skip to content

Commit ff1da37

Browse files
martinetdgitster
authored andcommitted
submodule--helper: accept '-i' shorthand for update --init
commit 3ad0ba7 ("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: 3ad0ba7 ("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>
1 parent e9019fc commit ff1da37

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

builtin/submodule--helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2990,7 +2990,7 @@ static int module_update(int argc, const char **argv, const char *prefix,
29902990
struct option module_update_options[] = {
29912991
OPT__SUPER_PREFIX(&opt.super_prefix),
29922992
OPT__FORCE(&opt.force, N_("force checkout updates"), 0),
2993-
OPT_BOOL(0, "init", &opt.init,
2993+
OPT_BOOL('i', "init", &opt.init,
29942994
N_("initialize uninitialized submodules before update")),
29952995
OPT_BOOL(0, "remote", &opt.remote,
29962996
N_("use SHA-1 of submodule's remote tracking branch")),

0 commit comments

Comments
 (0)