Re: [RFC/WIP PATCH 06/11] remote.h: add get_remote_capabilities, request_capabilities
- From
Jeff King <peff@peff.net>
- Date
- May 29, 2015, 22:08 UTC
- Message-ID
- <20150529220811.GA15678@peff.net>
- In-Reply-To
- <CAGZ79kbm5FCjMH-vV+_ByNvAdOD2idVtd8-bizEJpZpdE9cGjQ@mail.gmail.com>
On Fri, May 29, 2015 at 12:39:35PM -0700, Stefan Beller wrote:
Show 14 quoted lines
> > I think this is the reverse case of next_capabilities in the upload-pack
> > side, so I'll make the reverse suggestion. :) Would it make things nicer
> > if both v1 and v2 parsed the capabilities into a string_list?
>
> Ok, I'll do that. Though this makes future enhancements a bit uneasy.
> Say we want to transport a message by the server admins, this might be
> the right place to do.
>
> if (starts_with("message"))
> fprintf(stderr, ....
>
> Of course we can later add this in the future, but it would break older
> clients (clients as of this patch series). That's why I like the idea of
> adding a prefix here. Maybe just a "c:" as an abbreviation for capability.I don't understand how that breaks existing clients. Under your scheme, the older client says "message? That does not start with capability:, so I must ignore it". Without the "capability:" flag, it becomes "message? I do not know that type, so I must ignore it".
-Peff