summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-05-19 07:45:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-19 07:45:35 (GMT)
commitfab4a8a39666793d407371f519e8b6d25d33fa84 (patch)
treeea8851107dda1a726b3eec91d347996ead1ab683 /builtin
parent8c59ba9a764f1ae1f8d176ea17c636183cfd7267 (diff)
parentf3a3a021c716b46ed35e6b7171bbff4d8042da68 (diff)
downloadgit-fab4a8a39666793d407371f519e8b6d25d33fa84.zip
git-fab4a8a39666793d407371f519e8b6d25d33fa84.tar.gz
git-fab4a8a39666793d407371f519e8b6d25d33fa84.tar.bz2
Merge branch 'js/difftool-no-index'
The "--dir-diff" mode of "git difftool" is not useful in "--no-index" mode; they are now explicitly marked as mutually incompatible. * js/difftool-no-index: difftool --no-index: error out on --dir-diff (and don't crash)
Diffstat (limited to 'builtin')
-rw-r--r--builtin/difftool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 53188df..16eb8b7 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -727,7 +727,8 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
setup_work_tree();
setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
- }
+ } else if (dir_diff)
+ die(_("--dir-diff is incompatible with --no-index"));
if (use_gui_tool + !!difftool_cmd + !!extcmd > 1)
die(_("--gui, --tool and --extcmd are mutually exclusive"));