Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge 'http-msys-paths' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
kblees committed Aug 16, 2014
2 parents d2fdfb4 + cee2ef3 commit 09e536b
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions http.c
Expand Up @@ -7,6 +7,7 @@
#include "credential.h"
#include "version.h"
#include "pkt-line.h"
#include "exec_cmd.h"

int active_requests;
int http_is_verbose;
Expand Down Expand Up @@ -143,24 +144,36 @@ static void process_curl_messages(void)
}
#endif

static int git_config_path(const char **result,
const char *var, const char *value)
{
if (git_config_string(result, var, value))
return 1;
#ifdef __MINGW32__
if (**result == '/')
*result = system_path((*result) + 1);
#endif
return 0;
}

static int http_options(const char *var, const char *value, void *cb)
{
if (!strcmp("http.sslverify", var)) {
curl_ssl_verify = git_config_bool(var, value);
return 0;
}
if (!strcmp("http.sslcert", var))
return git_config_string(&ssl_cert, var, value);
return git_config_path(&ssl_cert, var, value);
#if LIBCURL_VERSION_NUM >= 0x070903
if (!strcmp("http.sslkey", var))
return git_config_string(&ssl_key, var, value);
return git_config_path(&ssl_key, var, value);
#endif
#if LIBCURL_VERSION_NUM >= 0x070908
if (!strcmp("http.sslcapath", var))
return git_config_string(&ssl_capath, var, value);
return git_config_path(&ssl_capath, var, value);
#endif
if (!strcmp("http.sslcainfo", var))
return git_config_string(&ssl_cainfo, var, value);
return git_config_path(&ssl_cainfo, var, value);
if (!strcmp("http.sslcertpasswordprotected", var)) {
ssl_cert_password_required = git_config_bool(var, value);
return 0;
Expand Down

0 comments on commit 09e536b

Please sign in to comment.