exporting GIT_SSL_NO_VERIFY=true
works as expected. Since there is a true
, innocent people might think false
is the oposite. They will be wrong and you will cause them problems.
Let's don't be lazy and use strcmp
char *gitSslNoVerify = getenv("GIT_SSL_NO_VERIFY");
if (gitSslNoVerify != NULL && strcmp(gitSslNoVerify, "true") == 0) {
printf("really evaluated as TRUE\n");
} else {
printf("really evaluated as FALSE\n");
}
Now it works as expected!
export GIT_SSL_NO_VERIFY; ./a.out
# GIT_SSL_NO_VERIFY: (null)
# really evaluated as FALSE
export GIT_SSL_NO_VERIFY=true; ./a.out
# GIT_SSL_NO_VERIFY: true
# really evaluated as TRUE
export GIT_SSL_NO_VERIFY=false; ./a.out
# GIT_SSL_NO_VERIFY: false
# really evaluated as FALSE
unset GIT_SSL_NO_VERIFY; ./a.out
# GIT_SSL_NO_VERIFY: (null)
# really evaluated as FALSE