Skip to content

Commit fab4a8a

Browse files
committed
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)
2 parents 8c59ba9 + f3a3a02 commit fab4a8a

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
@@ -727,7 +727,8 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
727727
setup_work_tree();
728728
setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
729729
setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
730-
}
730+
} else if (dir_diff)
731+
die(_("--dir-diff is incompatible with --no-index"));
731732

732733
if (use_gui_tool + !!difftool_cmd + !!extcmd > 1)
733734
die(_("--gui, --tool and --extcmd are mutually exclusive"));

0 commit comments

Comments
 (0)