summaryrefslogtreecommitdiffstats
path: root/git-access.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-24 13:55:50 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-25 10:44:02 -0700
commit39863089ed707cd58ae5ccfa700590f4e9248c4c (patch)
treeaea9c0048792690b6c2eeb63606ade9587d02d3b /git-access.c
parent092abe9b393d7cfdb1cf1d8012860591593210f3 (diff)
downloadsubsurface-39863089ed707cd58ae5ccfa700590f4e9248c4c.tar.gz
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>
Diffstat (limited to 'git-access.c')
-rw-r--r--git-access.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/git-access.c b/git-access.c
index cf6868af8..36309fa42 100644
--- a/git-access.c
+++ b/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_Final(hash, &ctx);
hash[20] = 0;
- if (same_string((char *)hash, KNOWN_CERT)) {
- fprintf(stderr, "cloud certificate considered %s, forcing it valid\n",
- valid ? "valid" : "not valid");
- return 1;
- }
+ if (verbose > 1)
+ if (same_string((char *)hash, KNOWN_CERT)) {
+ fprintf(stderr, "cloud certificate considered %s, forcing it valid\n",
+ valid ? "valid" : "not valid");
+ return 1;
+ }
}
return valid;
}
@@ -342,6 +343,8 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc
char *proxy_string;
git_config *conf;
+ if (verbose)
+ fprintf(stderr, "sync with remote %s[%s]\n", remote, branch);
git_repository_config(&conf, repo);
if (rt == RT_HTTPS && getProxyString(&proxy_string)) {
git_config_set_string(conf, "http.proxy", proxy_string);