Commit 9bf56c7b by Sebastian Bauer

Don't segfault if transport doesn't support push.

Instead, set an more informative error message.
parent 34a4ad46
...@@ -369,6 +369,12 @@ static int do_push(git_push *push) ...@@ -369,6 +369,12 @@ static int do_push(git_push *push)
int error; int error;
git_transport *transport = push->remote->transport; git_transport *transport = push->remote->transport;
if (!transport->push) {
giterr_set(GITERR_NET, "Remote transport doesn't support push");
error = -1;
goto on_error;
}
/* /*
* A pack-file MUST be sent if either create or update command * A pack-file MUST be sent if either create or update command
* is used, even if the server already has all the necessary * is used, even if the server already has all the necessary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment