summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--git-access.c2
-rw-r--r--save-git.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/git-access.c b/git-access.c
index 2d914ebfe..3a99d591c 100644
--- a/git-access.c
+++ b/git-access.c
@@ -568,6 +568,8 @@ struct git_repository *is_git_repository(const char *filename, const char **bran
free(branch);
return dummy_git_repository;
}
+ if (remote)
+ *remote = NULL;
*branchp = branch;
return repo;
}
diff --git a/save-git.c b/save-git.c
index 6e44b0851..64e04823b 100644
--- a/save-git.c
+++ b/save-git.c
@@ -1139,7 +1139,7 @@ int do_git_save(git_repository *repo, const char *branch, const char *remote, bo
if (create_new_commit(repo, branch, &id))
return report_error("creating commit failed");
- if (prefs.cloud_background_sync) {
+ if (remote && prefs.cloud_background_sync) {
/* now sync the tree with the cloud server */
if (strstr(remote, prefs.cloud_git_url)) {
return sync_with_remote(repo, remote, branch, RT_HTTPS);