diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-16 12:42:17 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-16 14:09:37 -0700 |
commit | bd11988f74d2fcc7873df691e06a1279d7fd3228 (patch) | |
tree | 616e9462420776362a68f0e5f733c248adb89ede /git-access.c | |
parent | 226e9a7e85ef1cf148daa61a54039ebfa060f4cb (diff) | |
download | subsurface-bd11988f74d2fcc7873df691e06a1279d7fd3228.tar.gz |
Cloud storage: warn the user if we are not online
This isn't perfect, but at least tells the user if we weren't able to
connect and are working just off the local cache.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'git-access.c')
-rw-r--r-- | git-access.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-access.c b/git-access.c index b86805994..2d914ebfe 100644 --- a/git-access.c +++ b/git-access.c @@ -262,8 +262,11 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc return 0; } - if (rt == RT_HTTPS && !canReachCloudServer()) + if (rt == RT_HTTPS && !canReachCloudServer()) { + // this is not an error, just a warning message, so return 0 + report_error("Cannot connect to cloud server, working with local copy"); return 0; + } #if USE_LIBGIT23_API git_fetch_options opts = GIT_FETCH_OPTIONS_INIT; if (rt == RT_SSH) |