]> git.ipfire.org Git - thirdparty/git.git/commitdiff
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
index f5d6d7e4f6700d86089ac84e930c7898ae01c6d8,9acf04f5b02b113f11801c8c5d19b6ec5f84cb62..569f615d3b13b2a57bc0f91ac35ae0fd12c52ef0
--- 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;