From ab90375c19f7e0495d964d37c7cabf23dff898e9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 19 Jun 2015 07:31:15 -0700 Subject: Use remote transport parameter instead of comparing strings We pass it in, we might as well use it. Signed-off-by: Dirk Hohndel --- git-access.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git-access.c') 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 -- cgit v1.2.3-70-g09d2