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

Re: warning: no common commits - slow pull

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 28, 2008, 00:47 UTC
Message-ID
<7voda1nbzc.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0802271605540.19665@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 6 quoted lines
> On Wed, 27 Feb 2008, Junio C Hamano wrote:
>
>> Daniel Barkalow <barkalow@iabervon.org> writes:
>> 
>> > Correcting the transport code is important (and should
>> > probably be done...

I thought about discarding the cached refs upon disconnect, but didn't do that, because presumably a caller might want to:

    transport_get_remote_refs() to find what they have
    decide what it wants
    transport_fetch_refs() to ask for them
    do stuff about the refs obtained
    transport_disconnect() to finish the transfer
    still do stuff about the refs obtained

and such a change would forbid the last step. But the only reason I avoided to break such a potential caller was because I did not bother to check if such a caller exists, and not because I thought the above sequence is sane, so if you think it is saner to clean up the stale information upon disconnect, please do so.

Show 5 quoted lines
> Using a single connection, either by just telling the remote that you want 
> to autofollow tags, and it should therefore include any tags that point to 
> any objects it includes, or by allowing you to list more refs that you 
> want after you've received the pack without disconnecting, would be quite 
> nice, but I agree that it's a longer-term issue.
Yes, that is what I was talking about.
Show 15 quoted lines
>> You won't know if you need only one object, so seeing that you
>> have T^{} and asking _only_ for T is _wrong_.  Think of a tag
>> that points at another tag that points at the commit.  You need
>> to tell the other end "I have T^{}, please give me T", and that
>> is exactly what the autofollowing does.
>
> I don't see that. If the situation is:
>
>       T - tag     master
>      /           /
> O - A - O - O - B
> ...
> The issue is that our starting set for our side of the negotiation is our 
> current refs, which doesn't include A. I'm suggesting that, for the 
> purposes of autofollow, A should be included.

By telling the other end that we have B, we are implicitly telling that we have A as well. Under normal situation, telling the other end we have A does not help nor hurt anything. Under abnormal situation (e.g. DNS round robin switching the other end in the middle), the other end may say "I dunno about B", but the protocol is designed to negotiate and find that both ends have A, by following the ancestry chain down, so I do not think telling the other end that we have A helps that much. I however think that such a change would help sweeping potential bugs under the rug by making them harder to trigger.

By the way, the situation I said your logic would break is this:
    ---o---A---o---o---B
            \
             T---S

Both T and S are annotated tags, pointing at A and T respectively, and they both peel to A. As long as you ask for both T and S you may be Ok, but it feels still wrong. Commit walkers may grab S, die before grabbing T (git-native protocol is atomic with respect to objects transfer, so it won't have such an issue).

Previous: Daniel BarkalowNext: Daniel Barkalow
Message 29 of 35 in “warning: no common commits - slow pull”
  1. Len BrownFeb 11, 2008
  2. Junio C HamanoFeb 11, 2008
  3. Daniel BarkalowFeb 17, 2008
  4. Johannes SchindelinFeb 17, 2008
  5. Daniel BarkalowFeb 17, 2008
  6. Junio C HamanoFeb 17, 2008
  7. Johannes SchindelinFeb 17, 2008
  8. Daniel BarkalowFeb 17, 2008
  9. Theodore TsoFeb 11, 2008
  10. Len BrownFeb 11, 2008
  11. Junio C HamanoFeb 11, 2008
  12. Theodore TsoFeb 11, 2008
  13. Len BrownFeb 15, 2008
  14. Johannes SchindelinFeb 16, 2008
  15. Florian WeimerFeb 25, 2008
  16. Daniel BarkalowFeb 25, 2008
  17. Len BrownFeb 26, 2008
  18. Nicolas PitreFeb 26, 2008
  19. Daniel BarkalowFeb 26, 2008
  20. Junio C HamanoFeb 27, 2008
  21. Junio C HamanoFeb 27, 2008
  22. Daniel BarkalowFeb 27, 2008
  23. Junio C HamanoFeb 27, 2008
  24. Daniel BarkalowFeb 27, 2008
  25. Shawn O. PearceFeb 28, 2008
  26. Shawn O. PearceFeb 28, 2008
  27. Jon LoeligerFeb 29, 2008
  28. Daniel BarkalowFeb 29, 2008
  29. Junio C HamanoFeb 28, 2008
  30. Daniel BarkalowFeb 28, 2008
  31. Always use the current connection's remote ref list in git protocolDaniel Barkalow, Feb 28, 2008
  32. Junio C HamanoFeb 28, 2008
  33. Daniel BarkalowFeb 28, 2008
  34. Florian WeimerFeb 11, 2008
  35. NixFeb 11, 2008

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.