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

Re: pack negotiation algorithm between 2 share-nothing repos

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2015, 16:49 UTC
Message-ID
<xmqqbnduuh8r.fsf@gitster.dls.corp.google.com>
In-Reply-To
<xmqqk2t0mrhi.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 24 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes:
>
>> I know this is a corner case, but because it has a valid use case,
>> maybe we should do something about it. Immediate reaction is to add an
>> option to send no "have"s. But maybe you guys have better ideas.
>
> This and similar corner cases were discussed in very early days of
> Git.
>
> One interesting idea floated back then but was not pursued was to
> dig and send have's sparsely and then back up.  Instead of digging
> and sending _all_ commits in a contiguous history, after sending the
> tip, you skip the commits from the history before sending the next
> one, and progressively make the skipping larger (e.g. Fibonacci, or
> exponential).  You need to remember what you sent and for each of
> what you sent its topologically-oldest descendant you sent earlier
> that you heard the other side does not have.
>
> Then, when you get an Ack, you know a stretch of history between a
> commit that is known to be common (i.e. the one you heard an Ack
> just now) and its descendant that is known only to you (i.e. the
> topologically-oldest one you remember that you did send and they
> didn't say is common).  At that point, you and the other end can
> bisect that range.
If anybody is interested, here is a good place to start:
http://thread.gmane.org/gmane.comp.version-control.git/96149/focus=102485

[Cc'ed Stefan as I think he was collecting possible enhancement to put in the protocol v2].

Previous: Junio C Hamano
Message 3 of 3 in “pack negotiation algorithm between 2 share-nothing repos”
  1. Duy NguyenAug 12, 2015
  2. Junio C HamanoAug 12, 2015
  3. Junio C HamanoAug 26, 2015

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.