|
9 | 9 | #include "version.h"
|
10 | 10 | #include "pkt-line.h"
|
11 | 11 | #include "gettext.h"
|
| 12 | +#include "exec_cmd.h" |
12 | 13 |
|
13 | 14 | int active_requests;
|
14 | 15 | int http_is_verbose;
|
@@ -181,24 +182,36 @@ static void process_curl_messages(void)
|
181 | 182 | }
|
182 | 183 | #endif
|
183 | 184 |
|
| 185 | +static int git_config_path(const char **result, |
| 186 | + const char *var, const char *value) |
| 187 | +{ |
| 188 | + if (git_config_string(result, var, value)) |
| 189 | + return 1; |
| 190 | +#ifdef __MINGW32__ |
| 191 | + if (**result == '/') |
| 192 | + *result = system_path((*result) + 1); |
| 193 | +#endif |
| 194 | + return 0; |
| 195 | +} |
| 196 | + |
184 | 197 | static int http_options(const char *var, const char *value, void *cb)
|
185 | 198 | {
|
186 | 199 | if (!strcmp("http.sslverify", var)) {
|
187 | 200 | curl_ssl_verify = git_config_bool(var, value);
|
188 | 201 | return 0;
|
189 | 202 | }
|
190 | 203 | if (!strcmp("http.sslcert", var))
|
191 |
| - return git_config_string(&ssl_cert, var, value); |
| 204 | + return git_config_path(&ssl_cert, var, value); |
192 | 205 | #if LIBCURL_VERSION_NUM >= 0x070903
|
193 | 206 | if (!strcmp("http.sslkey", var))
|
194 |
| - return git_config_string(&ssl_key, var, value); |
| 207 | + return git_config_path(&ssl_key, var, value); |
195 | 208 | #endif
|
196 | 209 | #if LIBCURL_VERSION_NUM >= 0x070908
|
197 | 210 | if (!strcmp("http.sslcapath", var))
|
198 |
| - return git_config_string(&ssl_capath, var, value); |
| 211 | + return git_config_path(&ssl_capath, var, value); |
199 | 212 | #endif
|
200 | 213 | if (!strcmp("http.sslcainfo", var))
|
201 |
| - return git_config_string(&ssl_cainfo, var, value); |
| 214 | + return git_config_path(&ssl_cainfo, var, value); |
202 | 215 | if (!strcmp("http.sslcertpasswordprotected", var)) {
|
203 | 216 | ssl_cert_password_required = git_config_bool(var, value);
|
204 | 217 | return 0;
|
|
0 commit comments