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

Function git_config_push_parameter

config.c:466–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466void git_config_push_parameter(const char *text)
467{
468 const char *value;
469
470 /*
471 * When we see:
472 *
473 * section.subsection=with=equals.key=value
474 *
475 * we cannot tell if it means:
476 *
477 * [section "subsection=with=equals"]
478 * key = value
479 *
480 * or:
481 *
482 * [section]
483 * subsection = with=equals.key=value
484 *
485 * We parse left-to-right for the first "=", meaning we'll prefer to
486 * keep the value intact over the subsection. This is historical, but
487 * also sensible since values are more likely to contain odd or
488 * untrusted input than a section name.
489 *
490 * A missing equals is explicitly allowed (as a bool-only entry).
491 */
492 value = strchr(text, '=');
493 if (value) {
494 char *key = xmemdupz(text, value - text);
495 git_config_push_split_parameter(key, value + 1);
496 free(key);
497 } else {
498 git_config_push_split_parameter(text, NULL);
499 }
500}
501
502void git_config_push_env(const char *spec)
503{

Callers 4

handle_optionsFunction · 0.85
cmd_mainFunction · 0.85
cmd_fetchFunction · 0.85
switch_branchesFunction · 0.85

Calls 2

xmemdupzFunction · 0.85

Tested by

no test coverage detected