summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-05 00:18:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-05 00:18:10 (GMT)
commit53083f8547cd45cdfabcf2f1bd21461cd6769189 (patch)
treeb55468902cea598ecdab645f4128e40ed3ec0f2b /diff.c
parent70f8ba55242ca7ebf46b43d8b29d09c552acce1f (diff)
parent1fa8a66bf76953c6fb9cfe5e17b26a3a0920f538 (diff)
downloadgit-53083f8547cd45cdfabcf2f1bd21461cd6769189.zip
git-53083f8547cd45cdfabcf2f1bd21461cd6769189.tar.gz
git-53083f8547cd45cdfabcf2f1bd21461cd6769189.tar.bz2
Merge branch 'mb/diff-default-to-indent-heuristics'
Make the "indent" heuristics the default in "diff" and diff.indentHeuristics configuration variable an escape hatch for those who do no want it. * mb/diff-default-to-indent-heuristics: add--interactive: drop diff.indentHeuristic handling diff: enable indent heuristic by default diff: have the diff-* builtins configure diff before initializing revisions diff: make the indent heuristic part of diff's basic configuration
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/diff.c b/diff.c
index f354653..48e5f9c 100644
--- a/diff.c
+++ b/diff.c
@@ -27,7 +27,7 @@
#endif
static int diff_detect_rename_default;
-static int diff_indent_heuristic; /* experimental */
+static int diff_indent_heuristic = 1;
static int diff_rename_limit_default = 400;
static int diff_suppress_blank_empty;
static int diff_use_color_default = -1;
@@ -290,9 +290,6 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
return 0;
}
- if (git_diff_heuristic_config(var, value, cb) < 0)
- return -1;
-
if (!strcmp(var, "diff.wserrorhighlight")) {
int val = parse_ws_error_highlight(value);
if (val < 0)
@@ -351,6 +348,9 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
if (starts_with(var, "submodule."))
return parse_submodule_config_option(var, value);
+ if (git_diff_heuristic_config(var, value, cb) < 0)
+ return -1;
+
return git_default_config(var, value, cb);
}