summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cb418b5)
raw | patch | inline | side by side (parent: cb418b5)
author | Jeff King <peff@peff.net> | |
Tue, 27 May 2008 14:28:43 +0000 (10:28 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 28 May 2008 04:30:16 +0000 (21:30 -0700) |
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>
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 | patch | blob | history |
diff --git a/builtin-clone.c b/builtin-clone.c
index 4740b130674c074180a190f4c700863ac992ef91..f4accbe541dc36d9c80b0bce63c3247af8abf4a0 100644 (file)
--- a/builtin-clone.c
+++ b/builtin-clone.c
struct remote *remote = remote_get(argv[0]);
struct transport *transport = transport_get(remote, argv[0]);
+ if (!transport->get_refs_list || !transport->fetch)
+ die("Don't know how to clone %s", transport->url);
+
transport_set_option(transport, TRANS_OPT_KEEP, "yes");
if (option_depth)