| 104 | const char *url); |
| 105 | |
| 106 | static int credential_config_callback(const char *var, const char *value, |
| 107 | const struct config_context *ctx UNUSED, |
| 108 | void *data) |
| 109 | { |
| 110 | struct credential *c = data; |
| 111 | const char *key; |
| 112 | |
| 113 | if (!skip_prefix(var, "credential.", &key)) |
| 114 | return 0; |
| 115 | |
| 116 | if (!value) |
| 117 | return config_error_nonbool(var); |
| 118 | |
| 119 | if (!strcmp(key, "helper")) { |
| 120 | if (*value) |
| 121 | string_list_append(&c->helpers, value); |
| 122 | else |
| 123 | string_list_clear(&c->helpers, 0); |
| 124 | } else if (!strcmp(key, "username")) { |
| 125 | if (!c->username_from_proto) { |
| 126 | free(c->username); |
| 127 | c->username = xstrdup(value); |
| 128 | } |
| 129 | } |
| 130 | else if (!strcmp(key, "usehttppath")) |
| 131 | c->use_http_path = git_config_bool(var, value); |
| 132 | else if (!strcmp(key, "sanitizeprompt")) |
| 133 | c->sanitize_prompt = git_config_bool(var, value); |
| 134 | else if (!strcmp(key, "protectprotocol")) |
| 135 | c->protect_protocol = git_config_bool(var, value); |
| 136 | |
| 137 | return 0; |
| 138 | } |
| 139 | |
| 140 | static int proto_is_http(const char *s) |
| 141 | { |
nothing calls this directly
no test coverage detected