git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: maybe breakage with latest git-pull and http protocol

From
Junio C Hamano <junkio@cox.net>
Date
Oct 15, 2005, 17:13 UTC
Message-ID
<7v1x2mog9n.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<863bn3lypn.fsf@blue.stonehenge.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
Show 20 quoted lines
>>>>>> "Daniel" == Daniel Barkalow <barkalow@iabervon.org> writes:
>
> Daniel> Can you give a general description of what happens? I've
> Daniel> noticed that I sometimes get spurious error messages that
> Daniel> don't actually affect the download, which I haven't tracked
> Daniel> down yet.
>
> OK, it happened this morning.  While syncing to update from
> yesterday's version, I got:
>
>     localhost:~/MIRROR/git-GIT % git-pull
>     Fetching refs/heads/master from http://www.kernel.org/pub/scm/git/git.git using http
>     Getting alternates list
>     got 4546738b58a0134eef154231b07d60fc174d56e3
>     walk 4546738b58a0134eef154231b07d60fc174d56e3
>     got d402d5566fdf226697a386dfb9858e5d954e9b91
>     got 873d8e5652c06c3891278f33546c437efc209c2d
>     walk d402d5566fdf226697a386dfb9858e5d954e9b91
>     error: 
>     Getting pack list
Sorry for an empty message.

Could you do the following to establish a reliable way to reproduce this problem in your setup, so we can diagnose it better?

First please apply this patch to http-fetch.c and rebuild your git.

diff --git a/http-fetch.c b/http-fetch.c
index 784aedf..2c1f72c 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -1009,7 +1009,10 @@ static int fetch_object(struct alt_base 
 	}
 
 	if (request->curl_result != CURLE_OK && request->http_code != 416) {
-		ret = error("%s", request->errorstr);
+		ret = error("%s (curl_result = %d, http_code = %ld, sha1 = %s)",
+			    request->errorstr, request->curl_result,
+			    request->http_code,
+			    sha1_to_hex(request->sha1));
 		release_request(request);
 		return ret;
 	}

Then, using that:

$ cd ~/MIRROR
$ rm -fr git-BROKEN
$ git-clone -n http://www.kernel.org/pub/scm/git/git.git git-BROKEN

If you got any error here, then we know we already have a way
to reproduce.  Please give us a log.

If the above succeeds, then please run

$ git-fsck-objects --full

to make sure we got things OK.  This should not report
anything.

Now, I'd like to make this repository as close as I can make it
to "after yesterday's pull", by rewining its top commit back to 
this one:

    commit f7aac2eac96b637755c89c2405a41749c8f6033a
    Author: Linus Torvalds <torvalds@osdl.org>
    Date:   Thu Oct 13 15:38:29 2005 -0700
    Add "-l" flag for repacking only local packs

$ git-reset --hard f7aac2eac96b637755c89c2405a41749c8f6033a
$ git-update-ref refs/heads/origin f7aac2eac96b637755c89c2405a41749c8f6033a

Since proposed updates (pu) branch usually contains everything
that is in the master, we need to get rid of it for this
experiment:

$ rm -f .git/refs/heads/pu

and the we get rid of objects that were added since then:

$ git-prune
$ git-fsck-objects --full

Now we are hopefully as close as "after yesterday's pull" state.

$ git-http-fetch -a -v heads/master http://www.kernel.org/pub/scm/git/git.git/

This will start with something like:

        Getting alternates list
        got 4546738b58a0134eef154231b07d60fc174d56e3
        walk 4546738b58a0134eef154231b07d60fc174d56e3
        got d402d5566fdf226697a386dfb9858e5d954e9b91
        got 873d8e5652c06c3891278f33546c437efc209c2d
        walk d402d5566fdf226697a386dfb9858e5d954e9b91
        ...

if you see the same error, instead of the empty "error:" up
above, we may see a bit more information.
Previous: Junio C HamanoNext: Nick Hengeveld
Message 14 of 17 in “maybe breakage with latest git-pull and http protocol”
  1. Randal L. SchwartzOct 13, 2005
  2. Junio C HamanoOct 13, 2005
  3. Randal L. SchwartzOct 14, 2005
  4. Junio C HamanoOct 14, 2005
  5. Randal L. SchwartzOct 14, 2005
  6. Daniel BarkalowOct 14, 2005
  7. Randal L. SchwartzOct 15, 2005
  8. Junio C HamanoOct 15, 2005
  9. Junio C HamanoOct 15, 2005
  10. Daniel BarkalowOct 15, 2005
  11. Nick HengeveldOct 15, 2005
  12. Nick HengeveldOct 15, 2005
  13. Junio C HamanoOct 15, 2005
  14. Junio C HamanoOct 15, 2005
  15. Nick HengeveldOct 15, 2005
  16. Randal L. SchwartzOct 15, 2005
  17. Nick HengeveldOct 20, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.