From 39863089ed707cd58ae5ccfa700590f4e9248c4c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 24 Aug 2015 13:55:50 -0700 Subject: 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 --- git-access.c | 13 ++++++++----- 1 file 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); -- cgit v1.2.3-70-g09d2