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

Re: git fetch -v not at all verbose?

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 3, 2010, 16:14 UTC
Message-ID
<7vwrouxu42.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20101103095249.GA9144@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
Show 11 quoted lines
> On Thu, Jan 21, 2010 at 09:42:36AM -0800, Junio C Hamano wrote:
> ...
>> There was a discussion about updating the commit walk exchange to bisect
>> the history (skip and try a much older one to see if it is reachable, but
>> to avoid overshooting, step back and see if a newer one is still common).
>> It would be a lot more work and needs to be implemented as a new protocol
>> capability, but I think it is the right way to go in the longer term.
>
> I thought about this some more: it seems that nothing in
> pack-protocol.txt dictates that client has to send have
> lines in order. The whole logic would be on client side.

The current protocol may not require any order for it to function correctly in the sense that the sent pack will contain everything that is necessary, but it does require that commits on a lineage to be sent from near tip to near root if you want to have a _good_ common ancestor to be found.

If the downloader sends older commits first without sending some new ones, the uploader can say "Ok, I know about that old one you told me you have, so we could use that as a common commit" [*1*]. But there is no way for it to continue the sentence with "... but I cannot tell if other ones you told me you have that I know nothing about are all directly connected to that common one we just found (in which case that common one is the best we can do), or you have newer ones than the common commit that I also have but you omitted from the listing (in other words, if you didn't omit them, we could have found a better common commit). Could you please back up a bit and let us see if we can do better with newer ones?" with the current protocol exchange.

The downloader _could_, upon seeing an ACK to a commit that is an ancestor of commits that it skipped, try sending these skipped commits, without telling the uploader that it what it is doing. But the uploader will unilaterally decide when it thinks it has heard enough, after giving an ACK back in the original protocol, or after finding enough common ancestors to cover all the tips requested with WANTs, so I suspect that you may not have a chance to play such a game without an explicit protocol extension.

[Footnote]

*1* That is what an ACK means. In an multi-ack exchange, it also tells the downloader there is no point to give any ancestors of that commit, but allows the downloader to continue sending commits from other lineage.

Previous: Michael S. TsirkinNext: Tay Ray Chuan
Message 22 of 28 in “problem cloning via http since v1.6.6-rc0”
  1. Yaroslav HalchenkoJan 21, 2010
  2. Tay Ray ChuanJan 21, 2010
  3. Tay Ray ChuanJan 21, 2010
  4. Yaroslav HalchenkoJan 21, 2010
  5. Tay Ray ChuanJan 21, 2010
  6. Yaroslav HalchenkoJan 21, 2010
  7. Ilari LiusvaaraJan 21, 2010
  8. Tay Ray ChuanJan 21, 2010
  9. Tay Ray ChuanJan 21, 2010
  10. Yaroslav HalchenkoJan 21, 2010
  11. http/remote-curl: coddle picky serversTay Ray Chuan, Jan 21, 2010
  12. Shawn O. PearceJan 21, 2010
  13. Mike HommeyJan 21, 2010
  14. git fetch -v not at all verbose?Michael S. Tsirkin, Jan 21, 2010
  15. Shawn O. PearceJan 21, 2010
  16. Michael S. TsirkinJan 21, 2010
  17. Shawn O. PearceJan 21, 2010
  18. Michael S. TsirkinJan 21, 2010
  19. Thomas RastJan 21, 2010
  20. Junio C HamanoJan 21, 2010
  21. Michael S. TsirkinNov 3, 2010
  22. Junio C HamanoNov 3, 2010
  23. Tay Ray ChuanJan 21, 2010
  24. Shawn O. PearceJan 21, 2010
  25. Mike HommeyJan 21, 2010
  26. Mike HommeyJan 21, 2010
  27. Ilari LiusvaaraJan 21, 2010
  28. Tay Ray ChuanJan 21, 2010

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.