mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: inform the user if remote sync failed
Being silent in this particular case was the wrong decision as it hides problems. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8462ae27b2
commit
c4eb9571be
1 changed files with 5 additions and 1 deletions
|
@ -545,8 +545,12 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc
|
||||||
#endif
|
#endif
|
||||||
// NOTE! A fetch error is not fatal, we just report it
|
// NOTE! A fetch error is not fatal, we just report it
|
||||||
if (error) {
|
if (error) {
|
||||||
if (!is_subsurface_cloud)
|
if (is_subsurface_cloud)
|
||||||
|
report_error("Cannot sync with cloud server, working with offline copy");
|
||||||
|
else
|
||||||
report_error("Unable to fetch remote '%s'", remote);
|
report_error("Unable to fetch remote '%s'", remote);
|
||||||
|
if (verbose)
|
||||||
|
fprintf(stderr, "remote fetched failed (%s)\n", giterr_last()->message);
|
||||||
error = 0;
|
error = 0;
|
||||||
} else {
|
} else {
|
||||||
error = check_remote_status(repo, origin, remote, branch, rt);
|
error = check_remote_status(repo, origin, remote, branch, rt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue