Merge branch 'jc/ws-error-highlight'
authorJunio C Hamano <gitster@pobox.com>
Wed, 26 Oct 2016 20:14:43 +0000 (13:14 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Oct 2016 20:14:43 +0000 (13:14 -0700)
"git diff/log --ws-error-highlight=<kind>" lacked the corresponding
configuration variable to set it by default.

* jc/ws-error-highlight:
  diff: introduce diff.wsErrorHighlight option
  diff.c: move ws-error-highlight parsing helpers up
  diff.c: refactor parse_ws_error_highlight()
  t4015: split out the "setup" part of ws-error-highlight test

1  2 
Documentation/diff-config.txt
Documentation/diff-options.txt
diff.c

Simple merge
Simple merge
diff --cc diff.c
--- 1/diff.c
--- 2/diff.c
+++ b/diff.c
@@@ -254,8 -263,14 +292,17 @@@ int git_diff_ui_config(const char *var
                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)
+                       return -1;
+               ws_error_highlight_default = val;
+               return 0;
+       }
        if (git_color_config(var, value, cb) < 0)
                return -1;