diff options
author | nulltoken <emeric.fermas@gmail.com> | 2013-08-21 13:20:17 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-08-27 16:57:16 +0200 |
commit | 44bc0c6ac3b939d3dfc1102be77e82e00e919ae4 (patch) | |
tree | 937774bd75faaa4368d9868d24c7ec6559f4b2c5 | |
parent | b83c92dd6fe11adae0ff29e1db381c31f0f88cb7 (diff) | |
download | libgit2-44bc0c6ac3b939d3dfc1102be77e82e00e919ae4.tar.gz |
remote: Warn the user when connecting with no url
-rw-r--r-- | src/remote.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/remote.c b/src/remote.c index 14ed740a8..948c755bb 100644 --- a/src/remote.c +++ b/src/remote.c @@ -558,8 +558,11 @@ int git_remote_connect(git_remote *remote, git_direction direction) t = remote->transport; url = git_remote__urlfordirection(remote, direction); - if (url == NULL ) + if (url == NULL ) { + giterr_set(GITERR_INVALID, + "Malformed remote '%s' - missing URL", remote->name); return -1; + } /* A transport could have been supplied in advance with * git_remote_set_transport */ |