diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-19 16:45:35 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-19 16:45:35 +0900 |
commit | fab4a8a39666793d407371f519e8b6d25d33fa84 (patch) | |
tree | ea8851107dda1a726b3eec91d347996ead1ab683 | |
parent | Merge branch 'jk/get-oid-indexed-object-name' (diff) | |
parent | difftool --no-index: error out on --dir-diff (and don't crash) (diff) | |
download | tgif-fab4a8a39666793d407371f519e8b6d25d33fa84.tar.xz |
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)
-rw-r--r-- | builtin/difftool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c index 53188df714..16eb8b70ea 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")); |