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

Function check_color_config

add-patch.c:305–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305static enum git_colorbool check_color_config(struct repository *r, const char *var)
306{
307 const char *value;
308 enum git_colorbool ret;
309
310 if (repo_config_get_value(r, var, &value))
311 ret = GIT_COLOR_UNKNOWN;
312 else
313 ret = git_config_colorbool(var, value);
314
315 /*
316 * Do not rely on want_color() to fall back to color.ui for us. It uses
317 * the value parsed by git_color_config(), which may not have been
318 * called by the main command.
319 */
320 if (ret == GIT_COLOR_UNKNOWN &&
321 !repo_config_get_value(r, "color.ui", &value))
322 ret = git_config_colorbool("color.ui", value);
323
324 return ret;
325}
326
327void interactive_config_init(struct interactive_config *cfg,
328 struct repository *r,

Callers 1

interactive_config_initFunction · 0.85

Calls 2

repo_config_get_valueFunction · 0.85
git_config_colorboolFunction · 0.85

Tested by

no test coverage detected