clone: make sure we support the transport type
commit37b78c25476d752953dc541e46fbb6bd5017edf7
authorJeff King <peff@peff.net>
Tue, 27 May 2008 14:28:43 +0000 (27 10:28 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 May 2008 04:30:16 +0000 (27 21:30 -0700)
tree2db26fcaed2a66faba00a8b4d582da5f0e3167f0
parentcb418b5a3882007616e00bc17b22e8653613ad5f
clone: make sure we support the transport type

If we use an unsupported transport (e.g., http when curl
support is not compiled in), transport_get reports an error
to the user, but we still get a transport object. We need to
manually check and abort the clone process at that point, or
we end up with a segfault.

Noticed by Thomas Rast.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clone.c