Skip to content

Commit e23c0b1

Browse files
committed
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.
1 parent 8f7fd98 commit e23c0b1

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/remote.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -136,35 +136,6 @@ static int write_add_refspec(git_repository *repo, const char *name, const char
136136
return 0;
137137
}
138138

139-
#if 0
140-
/* We could export this as a helper */
141-
static int get_check_cert(int *out, git_repository *repo)
142-
{
143-
git_config *cfg;
144-
const char *val;
145-
int error = 0;
146-
147-
assert(out && repo);
148-
149-
/* By default, we *DO* want to verify the certificate. */
150-
*out = 1;
151-
152-
/* Go through the possible sources for SSL verification settings, from
153-
* most specific to least specific. */
154-
155-
/* GIT_SSL_NO_VERIFY environment variable */
156-
if ((val = p_getenv("GIT_SSL_NO_VERIFY")) != NULL)
157-
return git_config_parse_bool(out, val);
158-
159-
/* http.sslVerify config setting */
160-
if ((error = git_repository_config__weakptr(&cfg, repo)) < 0)
161-
return error;
162-
163-
*out = git_config__get_bool_force(cfg, "http.sslverify", 1);
164-
return 0;
165-
}
166-
#endif
167-
168139
static int canonicalize_url(git_buf *out, const char *in)
169140
{
170141
if (in == NULL || strlen(in) == 0) {

0 commit comments

Comments
 (0)