Skip to content

Commit 59b8d38

Browse files
rctaygitster
authored andcommitted
http.c: remove verification of remote packs
Make http.c::fetch_pack_index() no longer check for the remote pack with a HEAD request before fetching the corresponding pack index file. Not only does sending a HEAD request before we do a GET incur a performance penalty, it does not offer any significant error- prevention advantages (pack fetching in the *_http_pack_request() methods is capable of handling any errors on its own). This addresses an issue raised elsewhere: http://code.google.com/p/msysgit/issues/detail?id=323 http://support.github.com/discussions/repos/957-cant-clone-over-http-or-git Signed-off-by: Tay Ray Chuan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 90e4311 commit 59b8d38

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

http.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -869,17 +869,6 @@ static int fetch_pack_index(unsigned char *sha1, const char *base_url)
869869
char *url;
870870
struct strbuf buf = STRBUF_INIT;
871871

872-
/* Don't use the index if the pack isn't there */
873-
end_url_with_slash(&buf, base_url);
874-
strbuf_addf(&buf, "objects/pack/pack-%s.pack", hex);
875-
url = strbuf_detach(&buf, 0);
876-
877-
if (http_get_strbuf(url, NULL, 0)) {
878-
ret = error("Unable to verify pack %s is available",
879-
hex);
880-
goto cleanup;
881-
}
882-
883872
if (has_pack_index(sha1)) {
884873
ret = 0;
885874
goto cleanup;

0 commit comments

Comments
 (0)