Merge branch 'rs/i18n-cannot-be-used-together' into maint-2.43

Clean-up code that handles combinations of incompatible options.

* rs/i18n-cannot-be-used-together:
  i18n: factorize even more 'incompatible options' messages
This commit is contained in:
Junio C Hamano
2024-02-08 16:22:05 -08:00
8 changed files with 16 additions and 12 deletions

View File

@ -279,7 +279,8 @@ static enum parse_opt_result get_value(struct parse_opt_ctx_t *p,
opt_name = optnamearg(opt, arg, flags);
other_opt_name = optnamearg(elem->opt, elem->arg, elem->flags);
error(_("%s is incompatible with %s"), opt_name, other_opt_name);
error(_("options '%s' and '%s' cannot be used together"),
opt_name, other_opt_name);
free(opt_name);
free(other_opt_name);
return -1;