Re: [PATCH v2 2/3] promisor-remote: allow a server to advertise more fields
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 27, 2025, 15:30 UTC
- Message-ID
- <xmqqldqiqdfp.fsf@gitster.g>
- In-Reply-To
- <aDVu4JmTU7Wz32Z7@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 14 quoted lines
> In the current form you need to reflow this whole paragraph every time a > new field is supported, and it's easy to miss the exact supported > fields. So my idea was to maybe move the supported fields into a > bulleted list. E.g.: > > promisor.sendFields:: > A comma or space separated list of additional remote related > fields that a server will send while advertising its promisor > remotes using the "promisor-remote" capability, see > linkgit:gitprotocol-v2[5]. The following fields are supported: > + > * "partialCloneFilter": contains the partial clone filter used for > the remote. > * "token": contains the authentication token for the remote.
Excellent.
> I guess this is mostly because the config documentation talks about > "fields", but that term is used elsewhere to indicate a name-value pair.
... which suggests the use of that word needs to be tightened a bit to save the next person from getting confused just like you did, perhaps?
Show 8 quoted lines
>> Also we can extend this setting to be per promisor remote later if >> there is a need for it. I don't think it would be difficult to do. And >> I don't think it's necessary right now, because it's likely that for >> simplicity most servers will manage all their promisor remotes in the >> same way (at least until usage of promisor remotes grows a lot). > > Yeah, with my fixed understanding I agree that it's not necessary to > configure this per remote as of now.
As long as we can extend later, starting small is always good. We can do "promisor.<name>.sendFields" later, for example.