Skip to content

Commit 290a666

Browse files
committed
Merge branch 'difftool-no-index-extra'
This patch addresses the segmentation faults in `git difftool --no-index --dir-diff`: surprisingly, those two options don't make no sense together. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 860e652 + cac7f0a commit 290a666

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
@@ -735,7 +735,8 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
735735
setup_work_tree();
736736
setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
737737
setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
738-
}
738+
} else if (dir_diff)
739+
die(_("--dir-diff is incompatible with --no-index"));
739740

740741
if (use_gui_tool && diff_gui_tool && *diff_gui_tool)
741742
setenv("GIT_DIFF_TOOL", diff_gui_tool, 1);

0 commit comments

Comments
 (0)