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) | ||
commit | fd35e42683113e367eee0bb8ac956dde3d95edde | |
tree | 30ddedf85f7d3f2f89944e4cebd14111491fc9f2 | tree | snapshot |
parent | 781c1834f5419bdf81bb7f3750170ccd6b809174 | commit | diff |
Fail properly when cloning from invalid HTTP URL
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>
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>
transport.c | diff | blob | history |