summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/git-access.c4
-rw-r--r--core/save-git.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/core/git-access.c b/core/git-access.c
index 1547dd654..2b7fa0ca2 100644
--- a/core/git-access.c
+++ b/core/git-access.c
@@ -602,7 +602,9 @@ static git_repository *update_local_repo(const char *localdir, const char *remot
report_error("Unable to open git cache repository at %s: %s", localdir, giterr_last()->message);
return NULL;
}
- sync_with_remote(repo, remote, branch, rt);
+ if (!prefs.git_local_only)
+ sync_with_remote(repo, remote, branch, rt);
+
return repo;
}
diff --git a/core/save-git.c b/core/save-git.c
index 1afb720fe..08161f3de 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -1225,7 +1225,7 @@ int do_git_save(git_repository *repo, const char *branch, const char *remote, bo
if (create_new_commit(repo, remote, branch, &id))
return report_error("creating commit failed");
- if (remote && prefs.cloud_background_sync) {
+ if (remote && prefs.cloud_background_sync && !prefs.git_local_only) {
/* now sync the tree with the cloud server */
if (strstr(remote, prefs.cloud_git_url)) {
return sync_with_remote(repo, remote, branch, RT_HTTPS);