remote: Warn the user when connecting with no url

This commit is contained in:
nulltoken 2013-08-21 13:20:17 +02:00
parent b83c92dd6f
commit 44bc0c6ac3

View File

@ -558,8 +558,11 @@ int git_remote_connect(git_remote *remote, git_direction direction)
t = remote->transport; t = remote->transport;
url = git_remote__urlfordirection(remote, direction); 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; return -1;
}
/* A transport could have been supplied in advance with /* A transport could have been supplied in advance with
* git_remote_set_transport */ * git_remote_set_transport */