Commit e23c0b18 by Patrick Steinhardt

remote: remove unused block of code

In "remote.c", we have a chunk of code that is #ifdef'fed out via
`#if 0` with a comment that we could export it as a helper function.
The code was implemented in 2013 and ifdef'fed in 2014, which shows that
there's clearly no interest in having such a helper at all.

As this block has recently created some confusion about `p_getenv` due
to it containing the only reference to that function in our codebase,
let's remove this block altogether.
parent 8f7fd981
...@@ -136,35 +136,6 @@ cleanup: ...@@ -136,35 +136,6 @@ cleanup:
return 0; return 0;
} }
#if 0
/* We could export this as a helper */
static int get_check_cert(int *out, git_repository *repo)
{
git_config *cfg;
const char *val;
int error = 0;
assert(out && repo);
/* By default, we *DO* want to verify the certificate. */
*out = 1;
/* Go through the possible sources for SSL verification settings, from
* most specific to least specific. */
/* GIT_SSL_NO_VERIFY environment variable */
if ((val = p_getenv("GIT_SSL_NO_VERIFY")) != NULL)
return git_config_parse_bool(out, val);
/* http.sslVerify config setting */
if ((error = git_repository_config__weakptr(&cfg, repo)) < 0)
return error;
*out = git_config__get_bool_force(cfg, "http.sslverify", 1);
return 0;
}
#endif
static int canonicalize_url(git_buf *out, const char *in) static int canonicalize_url(git_buf *out, const char *in)
{ {
if (in == NULL || strlen(in) == 0) { if (in == NULL || strlen(in) == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment