From 170078693fcccd614406e1c3c9fcbea8aaba0c13 Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Tue, 12 Dec 2017 15:10:56 -0800 Subject: transport: remove unused "push" in vtable After commit 0d0bac67ce3b ("transport: drop support for git-over-rsync", 2016-02-01), no transport in Git populates the "push" entry in the transport vtable. Remove this entry. Signed-off-by: Jonathan Tan Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- transport.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'transport.c') diff --git a/transport.c b/transport.c index f1e2f6199..8c4fc5477 100644 --- a/transport.c +++ b/transport.c @@ -627,7 +627,6 @@ void transport_take_over(struct transport *transport, transport->set_option = NULL; transport->get_refs_list = get_refs_via_connect; transport->fetch = fetch_refs_via_pack; - transport->push = NULL; transport->push_refs = git_transport_push; transport->disconnect = disconnect_git; transport->smart_options = &(data->options); @@ -969,13 +968,7 @@ int transport_push(struct transport *transport, *reject_reasons = 0; transport_verify_remote_names(refspec_nr, refspec); - if (transport->push) { - /* Maybe FIXME. But no important transport uses this case. */ - if (flags & TRANSPORT_PUSH_SET_UPSTREAM) - die("This transport does not support using --set-upstream"); - - return transport->push(transport, refspec_nr, refspec, flags); - } else if (transport->push_refs) { + if (transport->push_refs) { struct ref *remote_refs; struct ref *local_refs = get_local_heads(); int match_flags = MATCH_REFS_NONE; -- cgit v1.2.1