summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 781c183)
raw | patch | inline | side by side (parent: 781c183)
author | Petr Baudis <pasky@suse.cz> | |
Thu, 7 Aug 2008 00:06:30 +0000 (02:06 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 7 Aug 2008 18:39:14 +0000 (11:39 -0700) |
Currently, when cloning from invalid HTTP URL, git clone will possibly
return curl error, then a confusing message about remote HEAD and then
return success and leave an empty repository behind, confusing either
the end-user or the automated service calling it (think repo.or.cz).
This patch changes the error() calls in get_refs_via_curl() to die()s,
akin to the other get_refs_*() functions.
Cc: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
return curl error, then a confusing message about remote HEAD and then
return success and leave an empty repository behind, confusing either
the end-user or the automated service calling it (think repo.or.cz).
This patch changes the error() calls in get_refs_via_curl() to die()s,
akin to the other get_refs_*() functions.
Cc: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport.c | patch | blob | history |
diff --git a/transport.c b/transport.c
index 6f549b336ba1f7c84f45bd13317949bae4f9c704..b3e3e61f9dddec8230532f7d248beba801a38123 100644 (file)
--- a/transport.c
+++ b/transport.c
run_active_slot(slot);
if (results.curl_result != CURLE_OK) {
strbuf_release(&buffer);
- if (missing_target(&results)) {
- return NULL;
- } else {
- error("%s", curl_errorstr);
- return NULL;
- }
+ if (missing_target(&results))
+ die("%s not found: did you run git update-server-info on the server?", refs_url);
+ else
+ die("%s download error - %s", refs_url, curl_errorstr);
}
} else {
strbuf_release(&buffer);
- error("Unable to start request");
- return NULL;
+ die("Unable to start HTTP request");
}
data = buffer.buf;