File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -919,11 +919,12 @@ color.ui::
919
919
as `color.diff` and `color.grep` that control the use of color
920
920
per command family. Its scope will expand as more commands learn
921
921
configuration to set a default for the `--color` option. Set it
922
- to `always` if you want all output not intended for machine
923
- consumption to use color, to `true` or `auto` if you want such
924
- output to use color when written to the terminal, or to `false` or
925
- `never` if you prefer Git commands not to use color unless enabled
926
- explicitly with some other configuration or the `--color` option.
922
+ to `false` or `never` if you prefer Git commands not to use
923
+ color unless enabled explicitly with some other configuration
924
+ or the `--color` option. Set it to `always` if you want all
925
+ output not intended for machine consumption to use color, to
926
+ `true` or `auto` (this is the default since Git 1.8.4) if you
927
+ want such output to use color when written to the terminal.
927
928
928
929
column.ui::
929
930
Specify whether supported commands should output in columns.
Original file line number Diff line number Diff line change @@ -329,6 +329,7 @@ static int get_colorbool(int print)
329
329
{
330
330
get_colorbool_found = -1 ;
331
331
get_diff_color_found = -1 ;
332
+ get_color_ui_found = -1 ;
332
333
git_config_with_options (git_get_colorbool_config , NULL ,
333
334
given_config_file , respect_includes );
334
335
@@ -339,6 +340,10 @@ static int get_colorbool(int print)
339
340
get_colorbool_found = get_color_ui_found ;
340
341
}
341
342
343
+ if (get_colorbool_found < 0 )
344
+ /* default value if none found in config */
345
+ get_colorbool_found = GIT_COLOR_AUTO ;
346
+
342
347
get_colorbool_found = want_color (get_colorbool_found );
343
348
344
349
if (print ) {
Original file line number Diff line number Diff line change 1
1
#include "cache.h"
2
2
#include "color.h"
3
3
4
- static int git_use_color_default = 0 ;
4
+ static int git_use_color_default = GIT_COLOR_AUTO ;
5
5
int color_stdout_is_tty = -1 ;
6
6
7
7
/*
You can’t perform that action at this time.
0 commit comments