MCPcopy Index your code
hub / github.com/git/git / parse_config

Function parse_config

column.c:290–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290static int parse_config(unsigned int *colopts, const char *value)
291{
292 const char *sep = " ,";
293 int group_set = 0;
294
295 while (*value) {
296 int len = strcspn(value, sep);
297 if (len) {
298 if (parse_option(value, len, colopts, &group_set))
299 return -1;
300
301 value += len;
302 }
303 value += strspn(value, sep);
304 }
305 /*
306 * If none of "always", "never", and "auto" is specified, then setting
307 * layout implies "always".
308 *
309 * Current value in COL_ENABLE_MASK is disregarded. This means if
310 * you set column.ui = auto and pass --column=row, then "auto"
311 * will become "always".
312 */
313 if ((group_set & LAYOUT_SET) && !(group_set & ENABLE_SET))
314 *colopts = (*colopts & ~COL_ENABLE_MASK) | COL_ENABLED;
315 return 0;
316}
317
318static int column_config(const char *var, const char *value,
319 const char *key, unsigned int *colopts)

Callers 2

column_configFunction · 0.70
parseopt_column_callbackFunction · 0.70

Calls 1

parse_optionFunction · 0.70

Tested by

no test coverage detected