summaryrefslogtreecommitdiff
path: root/src/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport.c')
-rw-r--r--src/transport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transport.c b/src/transport.c
index 0c88e44d3..bc4248d5b 100644
--- a/src/transport.c
+++ b/src/transport.c
@@ -66,8 +66,10 @@ int git_transport_new(git_transport **out, const char *url)
fn = transport_find_fn(url);
- if (fn == NULL)
- return git__throw(GIT_EINVALIDARGS, "Unsupported URL or non-existent path");
+ if (fn == NULL) {
+ giterr_set(GITERR_NET, "Unsupported URL protocol");
+ return -1;
+ }
error = fn(&transport);
if (error < GIT_SUCCESS)