File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -919,11 +919,12 @@ color.ui::
919919 as `color.diff` and `color.grep` that control the use of color
920920 per command family. Its scope will expand as more commands learn
921921 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.
927928
928929column.ui::
929930 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)
329329{
330330 get_colorbool_found = -1 ;
331331 get_diff_color_found = -1 ;
332+ get_color_ui_found = -1 ;
332333 git_config_with_options (git_get_colorbool_config , NULL ,
333334 given_config_file , respect_includes );
334335
@@ -339,6 +340,10 @@ static int get_colorbool(int print)
339340 get_colorbool_found = get_color_ui_found ;
340341 }
341342
343+ if (get_colorbool_found < 0 )
344+ /* default value if none found in config */
345+ get_colorbool_found = GIT_COLOR_AUTO ;
346+
342347 get_colorbool_found = want_color (get_colorbool_found );
343348
344349 if (print ) {
Original file line number Diff line number Diff line change 11#include "cache.h"
22#include "color.h"
33
4- static int git_use_color_default = 0 ;
4+ static int git_use_color_default = GIT_COLOR_AUTO ;
55int color_stdout_is_tty = -1 ;
66
77/*
You can’t perform that action at this time.
0 commit comments