mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Enter offline mode if sync with cloud failed
In case syncing with the online repository failed, enter offline mode. This reflects the message sent to the user ("working with local copy"). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
afeb2e3652
commit
35b5b9282f
1 changed files with 2 additions and 0 deletions
|
@ -608,6 +608,8 @@ int sync_with_remote(git_repository *repo, const char *remote, const char *branc
|
|||
// If we returned GIT_EUSER during authentication, giterr_last() returns NULL
|
||||
fprintf(stderr, "remote fetch failed (%s)\n",
|
||||
giterr_last() ? giterr_last()->message : "authentication failed");
|
||||
// Since we failed to sync with online repository, enter offline mode
|
||||
prefs.git_local_only = true;
|
||||
error = 0;
|
||||
} else {
|
||||
error = check_remote_status(repo, origin, remote, branch, rt);
|
||||
|
|
Loading…
Add table
Reference in a new issue