|
8 | 8 | #include "credential.h"
|
9 | 9 | #include "version.h"
|
10 | 10 | #include "pkt-line.h"
|
| 11 | +#include "exec_cmd.h" |
11 | 12 |
|
12 | 13 | int active_requests;
|
13 | 14 | int http_is_verbose;
|
@@ -147,24 +148,36 @@ static void process_curl_messages(void)
|
147 | 148 | }
|
148 | 149 | #endif
|
149 | 150 |
|
| 151 | +static int git_config_path(const char **result, |
| 152 | + const char *var, const char *value) |
| 153 | +{ |
| 154 | + if (git_config_string(result, var, value)) |
| 155 | + return 1; |
| 156 | +#ifdef __MINGW32__ |
| 157 | + if (**result == '/') |
| 158 | + *result = system_path((*result) + 1); |
| 159 | +#endif |
| 160 | + return 0; |
| 161 | +} |
| 162 | + |
150 | 163 | static int http_options(const char *var, const char *value, void *cb)
|
151 | 164 | {
|
152 | 165 | if (!strcmp("http.sslverify", var)) {
|
153 | 166 | curl_ssl_verify = git_config_bool(var, value);
|
154 | 167 | return 0;
|
155 | 168 | }
|
156 | 169 | if (!strcmp("http.sslcert", var))
|
157 |
| - return git_config_string(&ssl_cert, var, value); |
| 170 | + return git_config_path(&ssl_cert, var, value); |
158 | 171 | #if LIBCURL_VERSION_NUM >= 0x070903
|
159 | 172 | if (!strcmp("http.sslkey", var))
|
160 |
| - return git_config_string(&ssl_key, var, value); |
| 173 | + return git_config_path(&ssl_key, var, value); |
161 | 174 | #endif
|
162 | 175 | #if LIBCURL_VERSION_NUM >= 0x070908
|
163 | 176 | if (!strcmp("http.sslcapath", var))
|
164 |
| - return git_config_string(&ssl_capath, var, value); |
| 177 | + return git_config_path(&ssl_capath, var, value); |
165 | 178 | #endif
|
166 | 179 | if (!strcmp("http.sslcainfo", var))
|
167 |
| - return git_config_string(&ssl_cainfo, var, value); |
| 180 | + return git_config_path(&ssl_cainfo, var, value); |
168 | 181 | if (!strcmp("http.sslcertpasswordprotected", var)) {
|
169 | 182 | ssl_cert_password_required = git_config_bool(var, value);
|
170 | 183 | return 0;
|
|
0 commit comments