diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-13 08:04:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-13 09:14:48 -0700 |
commit | 3ad517d87a63c287981e4f857ed826507cee041d (patch) | |
tree | 211b760865c9faa7f06088dddb36d07c19640a50 /git-access.c | |
parent | 9a22efb97b78da00dbc8fdfdc9fa5db9eac84708 (diff) | |
download | subsurface-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.c | 2 |
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); |