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