Skip to content

Commit 685a0c1

Browse files
committed
Merge branch 'js/difftool-no-index' into jch
* js/difftool-no-index: difftool --no-index: error out on --dir-diff (and don't crash)
2 parents 109257d + f3a3a02 commit 685a0c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin/difftool.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,8 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
733733
setup_work_tree();
734734
setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
735735
setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
736-
}
736+
} else if (dir_diff)
737+
die(_("--dir-diff is incompatible with --no-index"));
737738

738739
if (use_gui_tool && diff_gui_tool && *diff_gui_tool)
739740
setenv("GIT_DIFF_TOOL", diff_gui_tool, 1);

0 commit comments

Comments
 (0)