summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-10 20:52:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-10 20:52:25 (GMT)
commit163d24dc4d914191d1981ed0d9fa2a5d91b7d412 (patch)
tree99efdce4c601aeca8dbeea4779a39e651c3b46fd /builtin
parentcf36a4dc3589da2df8ab2101b5c385f12abcd67d (diff)
parente66adcadfe63508dfd7410c2253116043894d298 (diff)
downloadgit-163d24dc4d914191d1981ed0d9fa2a5d91b7d412.zip
git-163d24dc4d914191d1981ed0d9fa2a5d91b7d412.tar.gz
git-163d24dc4d914191d1981ed0d9fa2a5d91b7d412.tar.bz2
Merge branch 'js/difftool-builtin'
A few hot-fixes to C-rewrite of "git difftool". * js/difftool-builtin: t7800: simplify basic usage test difftool: fix bug when printing usage
Diffstat (limited to 'builtin')
-rw-r--r--builtin/difftool.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c
index b5e85ab..d13350c 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -647,10 +647,6 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
OPT_END()
};
- /* NEEDSWORK: once we no longer spawn anything, remove this */
- setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
- setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
-
git_config(difftool_config, NULL);
symlinks = has_symlinks;
@@ -661,6 +657,10 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
if (tool_help)
return print_tool_help();
+ /* NEEDSWORK: once we no longer spawn anything, remove this */
+ setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
+ setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
+
if (use_gui_tool && diff_gui_tool && *diff_gui_tool)
setenv("GIT_DIFF_TOOL", diff_gui_tool, 1);
else if (difftool_cmd) {