Re: [RFC/PATCH 0/3] protocol v2
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 28, 2015, 00:26 UTC
- Message-ID
- <CAPc5daUhN5OcQRs6Xn2oHDioZVze0VaPZFJ4OQCNKFy642hjWA@mail.gmail.com>
- In-Reply-To
- <CACsJy8AqRPm8ked+u0k83R2sFCE+XCGDEzeT_d4QsrKOOXUwLw@mail.gmail.com>
On Fri, Feb 27, 2015 at 4:07 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 5 quoted lines
> > There may be another hole, if we send "want <empty-tree>", it looks > like it will go through without causing errors. It's not exactly no-op > because an empty tree object will be bundled in result pack. But that > makes no difference in pratice. I didn't verify this though.
In addition to "that's not a no-op" problem, unless the old server has a ref that has an emtpy tree at its tip, such a fetch request will be rejected, unless the server is configured to serve any object, no?
If your new server does have a ref that points at an empty tree, a client may request you to send that, but this is not a problem, because the new server can tell if the client is sending it as a no-op probe or a serious request by looking at its capability request. A serious old client will not tell you that he is new, a probing new client does, and a serious new client does. So your new server can tell and will not be confused.
> as a commit. But even if the parsing is through, a non-empty > shallowCommits set would disable pack bitmap.
Performance penalty is fine. Over time we would upgrade and the point of the exercise is not to cause the old-new or new-old pair to die but keep talking the old protocol and getting correct results.