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

Re: Re-Transmission of blobs?

From
JWJosef Wolf <jw@raven.inka.de>
Date
Sep 11, 2013, 11:27 UTC
Message-ID
<20130911112758.GB14259@raven.wolf.lan>
In-Reply-To
<xmqqsixcy395.fsf@gitster.dls.corp.google.com>
On Di, Sep 10, 2013 at 10:51:02 -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Consider this simple history with only a handful of commits (as
> usual, time flows from left to right):
> 
>               E
>              /   
>     A---B---C---D
> 
> where D is at the tip of the sending side, E is at the tip of the
> receiving side.  The exchange goes roughly like this:
> 
>     (receiving side): what do you have?
> 
>     (sending side): my tip is at D.
> 
>     (receiving side): D?  I've never heard of it --- please give it
>                       to me.  I have E.

At this point, why would the receiving side not tell all the heads it knows about? That would enable the sending side to see whether it knows any of those commits. It then would be able to remove from the sending list all the objects that can be reached from the commits it knows about.

>     (sending side): E?  I don't know about it; must be something you
>                     created since you forked from me.  Tell me about
>                     its ancestors.

This is not exactly true. In the example I had given, the sending side has all three commits: C, D and E. So the sending side has no reason to say that it doesn't know anything about E. Therefore the sending side has all information it needs to deduce exactly which objects need to be sent to the receiving side.

What needs to be sent are all the objects in C..D but without all the objects in C..E. I guess this operation would be called set-difference in english.

And if the receiving side would have told that it has heads X Y Z in addition, and the sending side happens to have Y, then the sending side could in addition remove any objects that can be reached from Y from the sending list.

-- 
Josef Wolf
jw@raven.inka.de
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 19 in “Re-Transmission of blobs?”
  1. Josef WolfSep 10, 2013
  2. Junio C HamanoSep 10, 2013
  3. Josef WolfSep 11, 2013
  4. Junio C HamanoSep 11, 2013
  5. Josef WolfSep 12, 2013
  6. Jeff KingSep 12, 2013
  7. Josef WolfSep 12, 2013
  8. Jeff KingSep 12, 2013
  9. Josef WolfSep 13, 2013
  10. Jeff KingSep 16, 2013
  11. Josef WolfSep 20, 2013
  12. Jeff KingSep 24, 2013
  13. Josef WolfSep 24, 2013
  14. Pyeron, Jason J CTR (US)Sep 12, 2013
  15. Jeff KingSep 12, 2013
  16. Pyeron, Jason J CTR (US)Sep 12, 2013
  17. Josef WolfSep 13, 2013
  18. Jason PyeronSep 13, 2013
  19. Duy NguyenSep 13, 2013

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.