From: Junio C Hamano Date: Fri, 08 May 2020 16:17:22 GMT Subject: Re: [PATCH v5] submodule: port subcommand 'set-url' from shell to C Message-ID: In-Reply-To: <20200508063022.GA18557@generichostname> Denton Liu writes: >> + if (argc != 2 || !path || !newurl) { >> + usage_with_options(usage, options); >> + return 1; It is embarrassing that nobody noticed that usage_with_options() is NORETURN; return 1 has no effect here. >> + } >> + >> + config_name = xstrfmt("submodule.%s.url", path); >> + >> + config_set_in_gitmodules_file_gently(config_name, newurl); >> + sync_submodule(path, prefix, quiet ? OPT_QUIET : 0); >> + >> + free(config_name); >> + >> + return 0; >> +} >> + >> #define SUPPORT_SUPER_PREFIX (1<<0) >> >> struct cmd_struct {