diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2009-09-03 22:13:49 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-03 21:27:36 -0700 |
commit | c9e388bb48bdafdf19574add915ab0ce33a1907d (patch) | |
tree | 3b10f2c574135edf933e4fa5b80a9b08b8b6b7aa /transport-helper.c | |
parent | ad17f01399a9220b78678b322bd42b0a29898e01 (diff) | |
download | git-c9e388bb48bdafdf19574add915ab0ce33a1907d.tar.gz |
Make the "traditionally-supported" URLs a special case
Instead of trying to make http://, https://, and ftp:// URLs
indicative of some sort of pattern of transport helper usage, make
them a special case which runs the "curl" helper, and leave the
mechanism by which arbitrary helpers will be chosen entirely to future
work.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r-- | transport-helper.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/transport-helper.c b/transport-helper.c index 43fdc0a434..4684877723 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -152,13 +152,10 @@ static struct ref *get_refs_list(struct transport *transport, int for_push) return ret; } -int transport_helper_init(struct transport *transport) +int transport_helper_init(struct transport *transport, const char *name) { struct helper_data *data = xcalloc(sizeof(*data), 1); - char *eom = strchr(transport->url, ':'); - if (!eom) - return -1; - data->name = xstrndup(transport->url, eom - transport->url); + data->name = name; transport->data = data; transport->get_refs_list = get_refs_list; |