aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-23 20:59:03 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-01-06 10:46:07 -0800
commitfd5a521b948fc9f9551ea17d054a65d288ca990d (patch)
treeb4e28d394908fd71c16c52af2a320be9bfcd885f /core
parent97127e165292c9a2171b7812e3adc2336e67c21d (diff)
downloadsubsurface-fd5a521b948fc9f9551ea17d054a65d288ca990d.tar.gz
Sync with any remote git repository
Sync with remote git repository, even if this isn't the cloud storage. There seems to be no point in remote git repositories if they aren't synced. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/save-git.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/core/save-git.c b/core/save-git.c
index 227430a2e..1000f78a1 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -1272,12 +1272,9 @@ int do_git_save(git_repository *repo, const char *branch, const char *remote, bo
if (create_new_commit(repo, remote, branch, &id, create_empty))
return report_error("creating commit failed");
- 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);
- }
- }
+ /* now sync the tree with the remote server */
+ if (remote && prefs.cloud_background_sync && !prefs.git_local_only)
+ return sync_with_remote(repo, remote, branch, RT_HTTPS);
return 0;
}