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

Function git_default_push_config

environment.c:616–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616static int git_default_push_config(const char *var, const char *value)
617{
618 if (!strcmp(var, "push.default")) {
619 if (!value)
620 return config_error_nonbool(var);
621 else if (!strcmp(value, "nothing"))
622 push_default = PUSH_DEFAULT_NOTHING;
623 else if (!strcmp(value, "matching"))
624 push_default = PUSH_DEFAULT_MATCHING;
625 else if (!strcmp(value, "simple"))
626 push_default = PUSH_DEFAULT_SIMPLE;
627 else if (!strcmp(value, "upstream"))
628 push_default = PUSH_DEFAULT_UPSTREAM;
629 else if (!strcmp(value, "tracking")) /* deprecated */
630 push_default = PUSH_DEFAULT_UPSTREAM;
631 else if (!strcmp(value, "current"))
632 push_default = PUSH_DEFAULT_CURRENT;
633 else {
634 error(_("malformed value for %s: %s"), var, value);
635 return error(_("must be one of nothing, matching, simple, "
636 "upstream or current"));
637 }
638 return 0;
639 }
640
641 /* Add other config variables here and to Documentation/config.adoc. */
642 return 0;
643}
644
645static int git_default_attr_config(const char *var, const char *value)
646{

Callers 1

git_default_configFunction · 0.85

Calls 2

config_error_nonboolFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected