summaryrefslogtreecommitdiffstats
path: root/git-access.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 08:04:20 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 09:14:48 -0700
commit3ad517d87a63c287981e4f857ed826507cee041d (patch)
tree211b760865c9faa7f06088dddb36d07c19640a50 /git-access.c
parent9a22efb97b78da00dbc8fdfdc9fa5db9eac84708 (diff)
downloadsubsurface-3ad517d87a63c287981e4f857ed826507cee041d.tar.gz
Cloud storage: check connectivity before trying to connect
With a new repository we take a different path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'git-access.c')
-rw-r--r--git-access.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-access.c b/git-access.c
index 1c43a1386..c37360075 100644
--- a/git-access.c
+++ b/git-access.c
@@ -289,6 +289,8 @@ static git_repository *create_local_repo(const char *localdir, const char *remot
opts.fetch_opts.callbacks.credentials = credential_https_cb;
#endif
opts.checkout_branch = branch;
+ if (rt == RT_HTTPS && !canReachCloudServer())
+ return 0;
error = git_clone(&cloned_repo, remote, localdir, &opts);
if (error) {
report_error("git clone of %s failed (%s)", remote, giterr_last()->message);