MCPcopy Create free account
hub / github.com/git/git / git_config_colorbool

Function git_config_colorbool

color.c:383–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383enum git_colorbool git_config_colorbool(const char *var, const char *value)
384{
385 if (value) {
386 if (!strcasecmp(value, "never"))
387 return GIT_COLOR_NEVER;
388 if (!strcasecmp(value, "always"))
389 return GIT_COLOR_ALWAYS;
390 if (!strcasecmp(value, "auto"))
391 return GIT_COLOR_AUTO;
392 }
393
394 if (!var)
395 return GIT_COLOR_UNKNOWN;
396
397 /* Missing or explicit false to turn off colorization */
398 if (!git_config_bool(var, value))
399 return GIT_COLOR_NEVER;
400
401 /* any normal truth value defaults to 'auto' */
402 return GIT_COLOR_AUTO;
403}
404
405static bool check_auto_color(int fd)
406{

Callers 14

transport_color_configFunction · 0.85
grep_configFunction · 0.85
parse_opt_color_flag_cbFunction · 0.85
use_sideband_colorsFunction · 0.85
check_color_configFunction · 0.85
git_diff_ui_configFunction · 0.85
git_color_configFunction · 0.85
git_get_colorbool_configFunction · 0.85
git_push_configFunction · 0.85
git_clean_configFunction · 0.85
git_status_configFunction · 0.85

Calls 1

git_config_boolFunction · 0.85

Tested by

no test coverage detected