Skip to content

Commit cf5e772

Browse files
marcnarcgitster
authored andcommitted
diff: make the indent heuristic part of diff's basic configuration
This heuristic was originally introduced as an experimental feature, and therefore part of the UI configuration. But the user often sees diffs generated by plumbing commands like diff-tree. Moving the indent heuristic into diff's basic configuration prepares the way for diff plumbing commands to respect the setting. The heuristic itself merely makes the diffs more aesthetically pleasing, without changing their correctness. Scripts that rely on the diff plumbing commands should not care whether or not the heuristic is employed. Signed-off-by: Marc Branchaud <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 027a3b9 commit cf5e772

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

diff.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
290290
return 0;
291291
}
292292

293-
if (git_diff_heuristic_config(var, value, cb) < 0)
294-
return -1;
295-
296293
if (!strcmp(var, "diff.wserrorhighlight")) {
297294
int val = parse_ws_error_highlight(value);
298295
if (val < 0)
@@ -351,6 +348,9 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
351348
if (starts_with(var, "submodule."))
352349
return parse_submodule_config_option(var, value);
353350

351+
if (git_diff_heuristic_config(var, value, cb) < 0)
352+
return -1;
353+
354354
return git_default_config(var, value, cb);
355355
}
356356

0 commit comments

Comments
 (0)