RE: [PATCH v6 3/3] fetch --negotiate-only: do not update submodules
- From
Glen Choo <chooglen@google.com>
- Date
- Jan 20, 2022, 17:40 UTC
- Message-ID
- <kl6lh79yxq3h.fsf@chooglen-macbookpro.roam.corp.google.com>
- In-Reply-To
- <20220120023821.12320-1-worldhello.net@gmail.com>
Jiang Xin <worldhello.net@gmail.com> writes:
Show 38 quoted lines
> On Tue, 18 Jan 2022 at 16:00:56, Glen Choo wrote:
>
>> @@ -2014,6 +2015,27 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
>>
>> argc = parse_options(argc, argv, prefix,
>> builtin_fetch_options, builtin_fetch_usage, 0);
>> +
>> + if (recurse_submodules_cli != RECURSE_SUBMODULES_DEFAULT)
>> + recurse_submodules = recurse_submodules_cli;
>> +
>> + if (negotiate_only) {
>> + switch (recurse_submodules_cli) {
>> + case RECURSE_SUBMODULES_OFF:
>> + case RECURSE_SUBMODULES_DEFAULT:
>> + /*
>> + * --negotiate-only should never recurse into
>> + * submodules. Skip it by setting recurse_submodules to
>> + * RECURSE_SUBMODULES_OFF.
>> + */
>> + recurse_submodules = RECURSE_SUBMODULES_OFF;
>> + break;
>> +
>> + default:
>> + die(_("--negotiate-only and --recurse-submodules cannot be used together"));
>
> Found this new l10n message in "po/git.pot" in the next branch[1]. To be
> l10n-friendly, it's better to follow the standard Jean-Noël provided in
> commit 246cac8505 (i18n: turn even more messages into "cannot be used
> together" ones, 2022-01-05). And rewrite the l10n messageas as:
>
> - die(_("--negotiate-only and --recurse-submodules cannot be used together"));
> + die(_("options '%s' and '%s' cannot be used together"),
> + "--negotiate-only", "--recurse-submodules");
>
> [1]: https://github.com/git-l10n/git-po/blob/pot/next/2022-01-19.diff#L23
>
> --
> Jiang XinThanks for spotting this! I didn't realize we had standardized this. I'll send a reroll soon.