codesite-noreply@google.com writes:
Status: New
Owner: ----
New issue 323 by bjelli: Can't clone over http
http://code.google.com/p/msysgit/issues/detail?id=323
What steps will reproduce the problem?
1.Install Git-1.6.4-preview20090730.exe
2.Clone exsiting repository http://github.com/tekkub/addontemplate.git
This does not seem to be an msysgit issue. Even on a Linux host, v1.6.2.5
seems to work Ok but 'maint', 'master', nor 'next' does not clone this one
correctly.
Output:
got 2c8851d269d51676b8c626e63991ee68a6f5d578
walk 2c8851d269d51676b8c626e63991ee68a6f5d578
got 758419d18ad255c3417ca341c6e12c6ca1aa203e
got fa8a1ec5a791c245789f70e90a844f2b9a275991
walk fa8a1ec5a791c245789f70e90a844f2b9a275991
got e884a228df0e08e0f862edab6012d8407907ab48
got f7ea166470af2538a6a19642f8c45213bac7bd40
got 6100842656e95bf50f2c6f3ff6e997bcbe2474cc
got 445c0ea7c7193f6fcb42b32db50104926d328322
got a44d6309e48622590b2780f96bed371122db6b71
got 3ecefa3f04f394f64f8fe7be14ac20e69f2f2c18
Getting alternates list for http://github.com/tekkub/addontemplate.git
Getting pack list for http://github.com/tekkub/addontemplate.git
error: Unable to verify pack 382c25c935b744e909c749532578112d72a4aff9 is
available
error: Unable to find 0a41ac04d56ccc96491989dc71d9875cd804fc6b under
http://github.com/tekkub/addontemplate.git
Cannot obtain needed blob 0a41ac04d56ccc96491989dc71d9875cd804fc6b
while processing commit fa8a1ec5a791c245789f70e90a844f2b9a275991.
fatal: Fetch failed.
What version of the product are you using? On what operating system?
Git-1.6.4-preview20090730.exe
Windows XP
Please provide any additional information below.
Defect was discussed on the github support board here:
http://support.github.com/discussions/repos/957-cant-clone-over-http-or-git
Hi,
On Fri, Sep 4, 2009 at 6:25 PM, Junio C Hamano[off-list ref] wrote:
codesite-noreply@google.com writes:
quoted
Status: New
Owner: ----
New issue 323 by bjelli: Can't clone over http
http://code.google.com/p/msysgit/issues/detail?id=323
Junio, thanks for bringing this issue to the list's and my attention.
This does not seem to be an msysgit issue. Even on a Linux host, v1.6.2.5
seems to work Ok but 'maint', 'master', nor 'next' does not clone this one
correctly.
Releases including and after v1.6.4 will have this issue:
quoted
error: Unable to verify pack 382c25c935b744e909c749532578112d72a4aff9 is
available
error: Unable to find 0a41ac04d56ccc96491989dc71d9875cd804fc6b under
http://github.com/tekkub/addontemplate.git
The issue at hand is due to git checking the http repository for the
pack file before commencing the transfer; failing which, the transfer
aborts.
Right now, git chokes on the 500 error that github.com gives it, which
shouldn't be the case, even though that's a weird response.
--
Cheers,
Ray Chuan
-- >8 --
Subject: [PATCH] http.c: clarify missing-pack-check
Abort the pack transfer only if the pack is not available in the HTTP-
served repository; otherwise, allow the transfer to continue, even if
the check failed.
This addresses an issue raised by bjelli:
http://code.google.com/p/msysgit/issues/detail?id=323
Signed-off-by: Tay Ray Chuan <redacted>
---
http.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/http.c b/http.c
index 5926c5b..cba7e9a 100644
--- a/http.c
+++ b/http.c
@@ -864,6 +864,7 @@ int http_fetch_ref(const char *base, struct ref *ref)
static int fetch_pack_index(unsigned char *sha1, const char *base_url)
{
int ret = 0;
+ int result;
char *hex = xstrdup(sha1_to_hex(sha1));
char *filename;
char *url;@@ -874,11 +875,14 @@ static int fetch_pack_index(unsigned char *sha1, const char *base_url)
strbuf_addf(&buf, "objects/pack/pack-%s.pack", hex);
url = strbuf_detach(&buf, 0);
- if (http_get_strbuf(url, NULL, 0)) {
- ret = error("Unable to verify pack %s is available",
+ result = http_get_strbuf(url, NULL, 0);
+ if (result == HTTP_MISSING_TARGET) {
+ ret = error("Unable to find pack %s",
hex);
goto cleanup;
- }
+ } else if (result && http_is_verbose)
+ fprintf(stderr, "Unable to verify pack %s is available\n",
+ hex);
if (has_pack_index(sha1)) {
ret = 0;
--1.6.4.2