Skip to content

Commit

Permalink
Merge pull request #2175 from dscho/difftool-no-index
Browse files Browse the repository at this point in the history
Allow `git difftool --no-index` to run outside of a worktree
  • Loading branch information
dscho committed May 10, 2019
2 parents 3080a82 + 261b652 commit aaa144a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/difftool.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,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 && diff_gui_tool && *diff_gui_tool)
setenv("GIT_DIFF_TOOL", diff_gui_tool, 1);
Expand Down

0 comments on commit aaa144a

Please sign in to comment.