mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: adjust debugging messages
We shouldn't always tell the user about the perceived validity of the cloud certificate - we force it anyway. But it's nice to be easily able to see if we tried to update the remote, so add another debug output when run with -v Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
092abe9b39
commit
39863089ed
1 changed files with 8 additions and 5 deletions
13
git-access.c
13
git-access.c
|
@ -143,11 +143,12 @@ int certificate_check_cb(git_cert *cert, int valid, const char *host, void *payl
|
||||||
SHA1_Update(&ctx, cert509->data, cert509->len);
|
SHA1_Update(&ctx, cert509->data, cert509->len);
|
||||||
SHA1_Final(hash, &ctx);
|
SHA1_Final(hash, &ctx);
|
||||||
hash[20] = 0;
|
hash[20] = 0;
|
||||||
if (same_string((char *)hash, KNOWN_CERT)) {
|
if (verbose > 1)
|
||||||
fprintf(stderr, "cloud certificate considered %s, forcing it valid\n",
|
if (same_string((char *)hash, KNOWN_CERT)) {
|
||||||
valid ? "valid" : "not valid");
|
fprintf(stderr, "cloud certificate considered %s, forcing it valid\n",
|
||||||
return 1;
|
valid ? "valid" : "not valid");
|
||||||
}
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
@ -342,6 +343,8 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc
|
||||||
char *proxy_string;
|
char *proxy_string;
|
||||||
git_config *conf;
|
git_config *conf;
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
fprintf(stderr, "sync with remote %s[%s]\n", remote, branch);
|
||||||
git_repository_config(&conf, repo);
|
git_repository_config(&conf, repo);
|
||||||
if (rt == RT_HTTPS && getProxyString(&proxy_string)) {
|
if (rt == RT_HTTPS && getProxyString(&proxy_string)) {
|
||||||
git_config_set_string(conf, "http.proxy", proxy_string);
|
git_config_set_string(conf, "http.proxy", proxy_string);
|
||||||
|
|
Loading…
Add table
Reference in a new issue