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>
This commit is contained in:
Berthold Stoeger 2017-12-23 20:59:03 +01:00 committed by Dirk Hohndel
parent 97127e1652
commit fd5a521b94

View file

@ -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;
}