diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-02-14 12:54:22 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-02-14 12:54:22 -0800 |
| commit | df04a316176d5ba44422c2c6b0cb1a9fc31901e5 (patch) | |
| tree | 44fae97cc312ba6841416d5d999594a128eb7071 /diff.c | |
| parent | Merge branch 'ds/sparse-checkout-harden' (diff) | |
| parent | diff: move diff.wsErrorHighlight to "basic" config (diff) | |
| download | git-df04a316176d5ba44422c2c6b0cb1a9fc31901e5.tar.gz git-df04a316176d5ba44422c2c6b0cb1a9fc31901e5.zip | |
Merge branch 'jk/diff-honor-wserrhighlight-in-plumbing'
The diff-* plumbing family of subcommands now pay attention to the
diff.wsErrorHighlight configuration, which has been ignored before;
this allows "git add -p" to also show the whitespace problems to
the end user.
* jk/diff-honor-wserrhighlight-in-plumbing:
diff: move diff.wsErrorHighlight to "basic" config
Diffstat (limited to 'diff.c')
| -rw-r--r-- | diff.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -414,14 +414,6 @@ int git_diff_ui_config(const char *var, const char *value, void *cb) return 0; } - if (!strcmp(var, "diff.wserrorhighlight")) { - int val = parse_ws_error_highlight(value); - if (val < 0) - return -1; - ws_error_highlight_default = val; - return 0; - } - if (git_color_config(var, value, cb) < 0) return -1; @@ -450,6 +442,14 @@ int git_diff_basic_config(const char *var, const char *value, void *cb) return color_parse(value, diff_colors[slot]); } + if (!strcmp(var, "diff.wserrorhighlight")) { + int val = parse_ws_error_highlight(value); + if (val < 0) + return -1; + ws_error_highlight_default = val; + return 0; + } + /* like GNU diff's --suppress-blank-empty option */ if (!strcmp(var, "diff.suppressblankempty") || /* for backwards compatibility */ |
