From: Junio C Hamano <gitster@pobox•com>
To: Duy Nguyen <pclouds@gmail•com>
Cc: Git Mailing List <git@vger•kernel.org>
Subject: Re: pack negotiation algorithm between 2 share-nothing repos
Date: Wed, 12 Aug 2015 08:55:05 -0700 [thread overview]
Message-ID: <xmqqk2t0mrhi.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CACsJy8AKKYux6w=6X392mJhGFfqfEvJsrX0PjcivHPt2PYVKAw@mail.gmail.com> (Duy Nguyen's message of "Wed, 12 Aug 2015 18:27:24 +0700")
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.
next prev parent reply other threads:[~2015-08-12 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 11:27 pack negotiation algorithm between 2 share-nothing repos Duy Nguyen
2015-08-12 15:55 ` Junio C Hamano [this message]
2015-08-26 16:49 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqk2t0mrhi.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox