summaryrefslogtreecommitdiffstats
path: root/core/save-git.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-01-13 00:00:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-01-19 09:45:08 +0200
commit5a767ce9644b12e2eab5ef928ebb9673f36fcff8 (patch)
tree3a70beeca69e3f8264536e98af3cbbc2264dd329 /core/save-git.c
parentcec642b4d21c55cdddbb57067565f69ca080bf1e (diff)
downloadsubsurface-5a767ce9644b12e2eab5ef928ebb9673f36fcff8.tar.gz
Support non-https:// repositories for saving
On saving to a remote git repository, the transport was set to https://, which broke saving to ssh:// repositories. Instead determine the transport from the remote url. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/save-git.c')
-rw-r--r--core/save-git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/save-git.c b/core/save-git.c
index 287a8bab9..c8c9f06a4 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -1274,7 +1274,7 @@ int do_git_save(git_repository *repo, const char *branch, const char *remote, bo
/* now sync the tree with the remote server */
if (remote && !prefs.git_local_only)
- return sync_with_remote(repo, remote, branch, RT_HTTPS);
+ return sync_with_remote(repo, remote, branch, url_to_remote_transport(remote));
return 0;
}