summaryrefslogtreecommitdiff
path: root/builtin/difftool.c
diff options
context:
space:
mode:
authorLibravatar Jean-Noël Avila <jn.avila@free.fr>2022-01-31 22:07:46 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-02-04 13:58:28 -0800
commita699367bb8749a338aefb092c5d7ac75c69d61e1 (patch)
treec09bbd28e122a8a2b718fed0c41fbecd743ad8cf /builtin/difftool.c
parentSync with Git 2.35.1 (diff)
downloadtgif-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.c5
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);