diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-19 07:31:15 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-19 07:31:15 -0700 |
commit | ab90375c19f7e0495d964d37c7cabf23dff898e9 (patch) | |
tree | e59c4ae7f12e591392caab7dbce78ccde1adfd4d /git-access.c | |
parent | c765fb59610fa4244e9ca8dd077a13aab262341a (diff) | |
download | subsurface-ab90375c19f7e0495d964d37c7cabf23dff898e9.tar.gz |
Use remote transport parameter instead of comparing strings
We pass it in, we might as well use it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'git-access.c')
-rw-r--r-- | git-access.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-access.c b/git-access.c index 3a99d591c..e5029f62a 100644 --- a/git-access.c +++ b/git-access.c @@ -362,9 +362,9 @@ static git_repository *create_local_repo(const char *localdir, const char *remot git_repository *cloned_repo = NULL; git_clone_options opts = GIT_CLONE_OPTIONS_INIT; #if USE_LIBGIT23_API - if (strncmp(remote, "ssh://", 6) == 0) + if (rt == RT_SSH) opts.fetch_opts.callbacks.credentials = credential_ssh_cb; - else if (strncmp(remote, "https://", 8) == 0) + else if (rt == RT_HTTPS) opts.fetch_opts.callbacks.credentials = credential_https_cb; opts.repository_cb = repository_create_cb; #endif |