pack negotiation algorithm between 2 share-nothing repos
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Aug 12, 2015, 11:27 UTC
- Message-ID
- <CACsJy8AKKYux6w=6X392mJhGFfqfEvJsrX0PjcivHPt2PYVKAw@mail.gmail.com>
This is a corner case that has a real use case:
git clone linux-2.6.git cd linux-2.6 git remote add history git-history.git git fetch history # graft graft graft
Because history.gi and linux-2.6.git have nothing in common, the server side keeps asking for more "have"s and the client keeps sending in "git fetch history". Negotiation phase takes longer than my patience so I abort it, hack git to send no "have"s and retry.
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.
PS. I know i'm behind my git inbox. Looking into it soon.
-- Duy