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>
This commit is contained in:
Dirk Hohndel 2015-06-13 08:04:20 -07:00
parent 9a22efb97b
commit 3ad517d87a

View file

@ -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);