| 614 | } |
| 615 | |
| 616 | static 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 | |
| 645 | static int git_default_attr_config(const char *var, const char *value) |
| 646 | { |
no test coverage detected