mbox series

[0/7] standardize incompatibility messages

Message ID 20231206115215.94467-1-l.s.r@web.de (mailing list archive)
Headers show
Series standardize incompatibility messages | expand

Message

René Scharfe Dec. 6, 2023, 11:51 a.m. UTC
More of what a699367bb8 (i18n: factorize more 'incompatible options'
messages, 2022-01-31) did: Simplify checks for multiple mutually
exclusive options, reduce the number of strings to translate, improve UI
consistency a bit.

  push: use die_for_incompatible_opt4() for --delete/--tags/--all/--mirror
  repack: use die_for_incompatible_opt3() for -A/-k/--cruft
  revision: use die_for_incompatible_opt3() for --graph/--reverse/--walk-reflogs
  revision, rev-parse: factorize incompatibility messages about --exclude-hidden
  clean: factorize incompatibility message
  worktree: standardize incompatibility messages
  worktree: simplify incompatibility message for --orphan and commit-ish

 builtin/clean.c                    |  2 +-
 builtin/push.c                     | 12 ++++--------
 builtin/repack.c                   | 14 ++++----------
 builtin/rev-parse.c                |  9 ++++++---
 builtin/worktree.c                 | 21 +++++++++++----------
 revision.c                         | 27 +++++++++++++++------------
 t/t2400-worktree-add.sh            |  2 +-
 t/t6018-rev-list-glob.sh           |  6 ++----
 t/t6021-rev-list-exclude-hidden.sh |  4 ++--
 9 files changed, 46 insertions(+), 51 deletions(-)

--
2.43.0

Comments

Patrick Steinhardt Dec. 6, 2023, 1:07 p.m. UTC | #1
On Wed, Dec 06, 2023 at 12:51:54PM +0100, René Scharfe wrote:
> More of what a699367bb8 (i18n: factorize more 'incompatible options'
> messages, 2022-01-31) did: Simplify checks for multiple mutually
> exclusive options, reduce the number of strings to translate, improve UI
> consistency a bit.

Thanks for working on this! The patch series looks mostly good to me,
I've only got two questions.

Patrick

>   push: use die_for_incompatible_opt4() for --delete/--tags/--all/--mirror
>   repack: use die_for_incompatible_opt3() for -A/-k/--cruft
>   revision: use die_for_incompatible_opt3() for --graph/--reverse/--walk-reflogs
>   revision, rev-parse: factorize incompatibility messages about --exclude-hidden
>   clean: factorize incompatibility message
>   worktree: standardize incompatibility messages
>   worktree: simplify incompatibility message for --orphan and commit-ish
> 
>  builtin/clean.c                    |  2 +-
>  builtin/push.c                     | 12 ++++--------
>  builtin/repack.c                   | 14 ++++----------
>  builtin/rev-parse.c                |  9 ++++++---
>  builtin/worktree.c                 | 21 +++++++++++----------
>  revision.c                         | 27 +++++++++++++++------------
>  t/t2400-worktree-add.sh            |  2 +-
>  t/t6018-rev-list-glob.sh           |  6 ++----
>  t/t6021-rev-list-exclude-hidden.sh |  4 ++--
>  9 files changed, 46 insertions(+), 51 deletions(-)
> 
> --
> 2.43.0
> 
>