diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-01-04 16:16:22 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-08 12:00:42 +0100 |
commit | 35b5b9282f5d2068651dee7eb3993978fc258ac7 (patch) | |
tree | a630b9fe9d3f33756bdfa883efea098183a33e9d /core/git-access.c | |
parent | afeb2e36527b04c18c42a8ddaa9be3091115d0af (diff) | |
download | subsurface-35b5b9282f5d2068651dee7eb3993978fc258ac7.tar.gz |
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>
Diffstat (limited to 'core/git-access.c')
-rw-r--r-- | core/git-access.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/git-access.c b/core/git-access.c index cabe19e69..2503abce6 100644 --- a/core/git-access.c +++ b/core/git-access.c @@ -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); |