diff options
author | Jean-Noël Avila <jn.avila@free.fr> | 2022-01-31 22:07:46 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-04 13:58:28 -0800 |
commit | a699367bb8749a338aefb092c5d7ac75c69d61e1 (patch) | |
tree | c09bbd28e122a8a2b718fed0c41fbecd743ad8cf /builtin/difftool.c | |
parent | Sync with Git 2.35.1 (diff) | |
download | tgif-a699367bb8749a338aefb092c5d7ac75c69d61e1.tar.xz |
i18n: factorize more 'incompatible options' messages
Find more incompatible options to factorize.
When more than two options are mutually exclusive, print the ones
which are actually on the command line.
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/difftool.c')
-rw-r--r-- | builtin/difftool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c index c79fbbf67e..faa3507369 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -732,8 +732,9 @@ int cmd_difftool(int argc, const char **argv, const char *prefix) } else if (dir_diff) die(_("options '%s' and '%s' cannot be used together"), "--dir-diff", "--no-index"); - if (use_gui_tool + !!difftool_cmd + !!extcmd > 1) - die(_("options '%s', '%s', and '%s' cannot be used together"), "--gui", "--tool", "--extcmd"); + die_for_incompatible_opt3(use_gui_tool, "--gui", + !!difftool_cmd, "--tool", + !!extcmd, "--extcmd"); if (use_gui_tool) setenv("GIT_MERGETOOL_GUI", "true", 1); |