mirror of
https://git.proxmox.com/git/libgit2
synced 2025-11-03 11:12:27 +00:00
Don't segfault if transport doesn't support push.
Instead, set an more informative error message.
This commit is contained in:
parent
34a4ad46e8
commit
9bf56c7b1c
@ -369,6 +369,12 @@ static int do_push(git_push *push)
|
||||
int error;
|
||||
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
|
||||
* is used, even if the server already has all the necessary
|
||||
|
||||
Loading…
Reference in New Issue
Block a user