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 <jonathantanmy@google.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Tan committed Dec 12, 2017 at 15:10 UTC 170078693fcccd614406e1c3c9fcbea8aaba0c13
2 files changed +1 -9
transport.c
+1 -8
@@ -627,7 +627,6 @@ void transport_take_over(struct transport *transport,
627 transport->set_option = NULL;
628 transport->get_refs_list = get_refs_via_connect;
629 transport->fetch = fetch_refs_via_pack;
630 - transport->push = NULL;
630 transport->push_refs = git_transport_push;
631 transport->disconnect = disconnect_git;
632 transport->smart_options = &(data->options);
@@ -969,13 +968,7 @@ int transport_push(struct transport *transport,
968 *reject_reasons = 0;
969 transport_verify_remote_names(refspec_nr, refspec);
970
972 - if (transport->push) {
973 - /* Maybe FIXME. But no important transport uses this case. */
974 - if (flags & TRANSPORT_PUSH_SET_UPSTREAM)
975 - die("This transport does not support using --set-upstream");
976 -
977 - return transport->push(transport, refspec_nr, refspec, flags);
978 - } else if (transport->push_refs) {
971 + if (transport->push_refs) {
972 struct ref *remote_refs;
973 struct ref *local_refs = get_local_heads();
974 int match_flags = MATCH_REFS_NONE;
transport.h
-1
@@ -103,7 +103,6 @@ struct transport {
103 * process involved generating new commits.
104 **/
105 int (*push_refs)(struct transport *transport, struct ref *refs, int flags);
106 - int (*push)(struct transport *connection, int refspec_nr, const char **refspec, int flags);
106 int (*connect)(struct transport *connection, const char *name,
107 const char *executable, int fd[2]);
108