mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
git storage: only sync with remote if git_local_only isn't set
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e2e4bb6c2a
commit
a1ec0d6724
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue